Mercado Libre: First steps

This commit is contained in:
Gustavo Maximiliano Cortez 2017-05-08 09:23:47 -03:00
commit 9abd852f4b
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
18 changed files with 3648 additions and 0 deletions

View file

@ -0,0 +1,271 @@
'use strict';
angular.module('copayApp.controllers').controller('buyMercadoLibreController', function($scope, $log, $state, $timeout, $filter, $ionicHistory, lodash, mercadoLibreService, popupService, profileService, ongoingProcess, configService, walletService, payproService, bwcError, externalLinkService, platformInfo) {
var amount;
var currency;
$scope.isCordova = platformInfo.isCordova;
$scope.openExternalLink = function(url) {
externalLinkService.open(url);
};
var showErrorAndBack = function(msg, err) {
$scope.sendStatus = '';
err = err && err.errors ? err.errors[0].message : err;
popupService.showAlert(msg, err, function() {
$ionicHistory.goBack();
});
};
var showError = function(msg, err) {
$scope.sendStatus = '';
err = err && err.errors ? err.errors[0].message : (err || '');
popupService.showAlert(msg, err);
};
var publishAndSign = function(wallet, txp, onSendStatusChange, cb) {
if (!wallet.canSign() && !wallet.isPrivKeyExternal()) {
var err = 'No signing proposal: No private key';
$log.info(err);
return cb(err);
}
walletService.publishAndSign(wallet, txp, function(err, txp) {
if (err) return cb(err);
return cb(null, txp);
}, onSendStatusChange);
};
var statusChangeHandler = function(processName, showName, isOn) {
$log.debug('statusChangeHandler: ', processName, showName, isOn);
if (processName == 'buyingGiftCard' && !isOn) {
$scope.sendStatus = 'success';
$timeout(function() {
$scope.$digest();
}, 100);
} else if (showName) {
$scope.sendStatus = showName;
}
};
var checkTransaction = lodash.throttle(function(count, dataSrc) {
mercadoLibreService.createGiftCard(dataSrc, function(err, giftCard) {
console.log('[buyMercadoLibre.js:53]',giftCard); //TODO
$log.debug("creating gift card " + count);
if (err) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
giftCard = {};
giftCard.status = 'FAILURE';
showError('Error creating gift card', err);
}
if (giftCard.status == 'PENDING' && count < 3) {
$log.debug("Waiting for payment confirmation");
checkTransaction(count + 1, dataSrc);
return;
}
var now = moment().unix() * 1000;
var newData = giftCard;
newData['invoiceId'] = dataSrc.invoiceId;
newData['accessKey'] = dataSrc.accessKey;
newData['invoiceUrl'] = dataSrc.invoiceUrl;
newData['amount'] = dataSrc.amount;
newData['currency'] = dataSrc.currency;
newData['date'] = dataSrc.invoiceTime || now;
newData['uuid'] = dataSrc.uuid;
if (newData.status == 'expired') {
mercadoLibreService.savePendingGiftCard(newData, {
remove: true
}, function(err) {
$log.error(err);
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
showError('Invoice expired');
return;
});
}
mercadoLibreService.savePendingGiftCard(newData, null, function(err) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
$log.debug("Saving new gift card with status: " + newData.status);
$scope.mlGiftCard = newData;
});
});
}, 8000, {
'leading': true
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
amount = data.stateParams.amount;
currency = data.stateParams.currency;
/* TODO
if (amount > 2000 || amount < 50) {
showErrorAndBack('Purchase amount must be a value between 50 and 2000');
return;
}
*/
$scope.amountUnitStr = $filter('formatFiatAmount')(amount) + ' ' + currency;
$scope.network = mercadoLibreService.getNetwork();
$scope.wallets = profileService.getWallets({
onlyComplete: true,
network: $scope.network,
hasFunds: true
});
if (lodash.isEmpty($scope.wallets)) {
showErrorAndBack('No wallets with funds');
return;
}
$scope.wallet = $scope.wallets[0]; // Default first wallet
});
$scope.buyConfirm = function() {
var message = 'Buy gift card for ' + amount + ' ' + currency;
var okText = 'Confirm';
var cancelText = 'Cancel';
popupService.showConfirm(null, message, okText, cancelText, function(ok) {
if (!ok) return;
var config = configService.getSync();
var configWallet = config.wallet;
var walletSettings = configWallet.settings;
// Selected WalletID as UUID
var uuid = $scope.wallet.id;
var dataSrc = {
currency: currency,
amount: amount,
uuid: uuid
};
ongoingProcess.set('buyingGiftCard', true, statusChangeHandler);
mercadoLibreService.createBitPayInvoice(dataSrc, function(err, dataInvoice) {
if (err) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
if (err && err.message && err.message.match(/suspended/i)) {
showError('Service not available', 'Mercadolibre Gift Card Service is not available at this moment. Please try back later.');
} else {
showError('Could not access Gift Card Service', err);
};
return;
}
var accessKey = dataInvoice ? dataInvoice.accessKey : null;
if (!accessKey) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
showError('No access key defined');
return;
}
mercadoLibreService.getBitPayInvoice(dataInvoice.invoiceId, function(err, invoice) {
if (err) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
showError('Error getting BitPay invoice', err);
return;
}
var payProUrl = (invoice && invoice.paymentUrls) ? invoice.paymentUrls.BIP73 : null;
if (!payProUrl) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
showError('Error fetching invoice');
return;
}
payproService.getPayProDetails(payProUrl, function(err, payProDetails) {
if (err) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
showError('Error fetching payment info', bwcError.msg(err));
return;
}
var outputs = [];
var toAddress = payProDetails.toAddress;
var amountSat = payProDetails.amount;
var comment = amount + ' ' + currency + ' Mercadolibre Gift Card';
outputs.push({
'toAddress': toAddress,
'amount': amountSat,
'message': comment
});
var txp = {
toAddress: toAddress,
amount: amountSat,
outputs: outputs,
message: comment,
payProUrl: payProUrl,
excludeUnconfirmedUtxos: configWallet.spendUnconfirmed ? false : true,
feeLevel: walletSettings.feeLevel || 'normal'
};
walletService.createTx($scope.wallet, txp, function(err, ctxp) {
if (err) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
showError('Could not create transaction', bwcError.msg(err));
return;
}
publishAndSign($scope.wallet, ctxp, function() {}, function(err, txSent) {
if (err) {
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
showError('Could not send transaction', err);
return;
}
$log.debug('Transaction broadcasted. Waiting for confirmation...');
var invoiceId = JSON.parse(payProDetails.merchant_data).invoiceId;
var dataSrc = {
currency: currency,
amount: amount,
uuid: uuid,
accessKey: accessKey,
invoiceId: invoice.id,
invoiceUrl: payProUrl,
invoiceTime: invoice.invoiceTime
};
checkTransaction(1, dataSrc);
});
});
}, true); // Disable loader
});
});
});
};
$scope.showWalletSelector = function() {
$scope.walletSelectorTitle = 'Buy from';
$scope.showWallets = true;
};
$scope.onWalletSelect = function(wallet) {
$scope.wallet = wallet;
};
$scope.goBackHome = function() {
$scope.sendStatus = '';
$ionicHistory.nextViewOptions({
disableAnimate: true,
historyRoot: true
});
$ionicHistory.clearHistory();
var claimCode = $scope.mlGiftCard ? $scope.mlGiftCard.pin : null;
$state.go('tabs.home').then(function() {
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$state.transitionTo('tabs.giftcards.mercadoLibre').then(function() {
$state.transitionTo('tabs.giftcards.mercadoLibre.cards', {
cardClaimCode: claimCode
});
});
});
};
});

View file

@ -0,0 +1,24 @@
'use strict';
angular.module('copayApp.controllers').controller('mercadoLibreController',
function($scope, $timeout, $log, mercadoLibreService, externalLinkService, popupService) {
$scope.openExternalLink = function(url) {
externalLinkService.open(url);
};
var init = function() {
mercadoLibreService.getPendingGiftCards(function(err, gcds) {
if (err) $log.error(err);
$scope.giftCards = gcds;
$timeout(function() {
$scope.$digest();
});
});
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.network = mercadoLibreService.getNetwork();
init();
});
});

View file

@ -0,0 +1,106 @@
'use strict';
angular.module('copayApp.controllers').controller('mercadoLibreCardsController',
function($scope, $timeout, $ionicModal, $log, $ionicScrollDelegate, lodash, mercadoLibreService, platformInfo, externalLinkService, popupService, ongoingProcess) {
$scope.openExternalLink = function(url) {
externalLinkService.open(url);
};
var updateGiftCards = function(cb) {
mercadoLibreService.getPendingGiftCards(function(err, gcds) {
if (err) {
popupService.showAlert('Could not get gift cards', err);
if (cb) return cb();
else return;
}
$scope.giftCards = gcds;
$timeout(function() {
$scope.$digest();
$ionicScrollDelegate.resize();
if (cb) return cb();
}, 100);
});
};
$scope.updatePendingGiftCards = lodash.debounce(function() {
$scope.updatingPending = {};
updateGiftCards(function() {
var index = 0;
var gcds = $scope.giftCards;
lodash.forEach(gcds, function(dataFromStorage) {
if (dataFromStorage.status == 'PENDING' || dataFromStorage.status == 'invalid') {
$log.debug("Creating / Updating gift card");
$scope.updatingPending[dataFromStorage.invoiceId] = true;
mercadoLibreService.createGiftCard(dataFromStorage, function(err, giftCard) {
$scope.updatingPending[dataFromStorage.invoiceId] = false;
if (err) {
popupService.showAlert('Error creating gift card', err);
return;
}
if (giftCard.status != 'PENDING') {
var newData = {};
lodash.merge(newData, dataFromStorage, giftCard);
if (newData.status == 'expired') {
mercadoLibreService.savePendingGiftCard(newData, {
remove: true
}, function(err) {
updateGiftCards();
return;
});
}
mercadoLibreService.savePendingGiftCard(newData, null, function(err) {
$log.debug("Saving new gift card");
updateGiftCards();
});
}
});
}
});
});
}, 1000, {
'leading': true
});
$scope.openCardModal = function(card) {
$scope.card = card;
$ionicModal.fromTemplateUrl('views/modals/mercadolibre-card-details.html', {
scope: $scope
}).then(function(modal) {
$scope.mercadoLibreCardDetailsModal = modal;
$scope.mercadoLibreCardDetailsModal.show();
});
$scope.$on('modal.hidden', function() {
$scope.updatePendingGiftCards();
});
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.cardClaimCode = data.stateParams.cardClaimCode;
updateGiftCards(function() {
if ($scope.cardClaimCode) {
var card = lodash.find($scope.giftCards, {
claimCode: $scope.cardClaimCode
});
if (lodash.isEmpty(card)) {
popupService.showAlert(null, 'Card not found');
return;
}
$scope.openCardModal(card);
}
});
});
$scope.$on("$ionicView.afterEnter", function(event, data) {
$scope.updatePendingGiftCards();
});
});

View file

@ -0,0 +1,83 @@
'use strict';
angular.module('copayApp.controllers').controller('mercadoLibreCardDetailsController', function($scope, $log, $timeout, $ionicScrollDelegate, bwcError, mercadoLibreService, lodash, ongoingProcess, popupService, externalLinkService) {
$scope.cancelGiftCard = function() {
ongoingProcess.set('cancelingGiftCard', true);
mercadoLibreService.cancelGiftCard($scope.card, function(err, data) {
ongoingProcess.set('cancelingGiftCard', false);
if (err) {
popupService.showAlert('Error canceling gift card', bwcError.msg(err));
return;
}
$scope.card.cardStatus = data.cardStatus;
$timeout(function() {
$ionicScrollDelegate.resize();
$ionicScrollDelegate.scrollTop();
}, 10);
mercadoLibreService.savePendingGiftCard($scope.card, null, function(err) {
$scope.refreshGiftCard();
});
});
};
$scope.remove = function() {
mercadoLibreService.savePendingGiftCard($scope.card, {
remove: true
}, function(err) {
$scope.cancel();
});
};
$scope.refreshGiftCard = function() {
ongoingProcess.set('updatingGiftCard', true);
mercadoLibreService.getPendingGiftCards(function(err, gcds) {
if (lodash.isEmpty(gcds)) {
$timeout(function() {
ongoingProcess.set('updatingGiftCard', false);
}, 1000);
}
if (err) {
popupService.showAlert('Error', err);
return;
}
var index = 0;
lodash.forEach(gcds, function(dataFromStorage) {
if (++index == Object.keys(gcds).length) {
$timeout(function() {
ongoingProcess.set('updatingGiftCard', false);
}, 1000);
}
if (dataFromStorage.status == 'PENDING' && dataFromStorage.invoiceId == $scope.card.invoiceId) {
$log.debug("creating gift card");
mercadoLibreService.createGiftCard(dataFromStorage, function(err, giftCard) {
if (err) {
popupService.showAlert('Error', bwcError.msg(err));
return;
}
if (!lodash.isEmpty(giftCard)) {
var newData = {};
lodash.merge(newData, dataFromStorage, giftCard);
mercadoLibreService.savePendingGiftCard(newData, null, function(err) {
$log.debug("Saving new gift card");
$scope.card = newData;
$timeout(function() {
$scope.$digest();
});
});
} else $log.debug("pending gift card not available yet");
});
}
});
});
};
$scope.cancel = function() {
$scope.mercadoLibreCardDetailsModal.hide();
};
$scope.openExternalLink = function(url) {
externalLinkService.open(url);
};
});

View file

@ -1026,6 +1026,57 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
abstract: true
})
/*
*
* Mercado Libre Gift Card
*
*/
.state('tabs.giftcards.mercadoLibre', {
url: '/mercadoLibre',
views: {
'tab-home@tabs': {
controller: 'mercadoLibreController',
templateUrl: 'views/mercadoLibre.html'
}
}
})
.state('tabs.giftcards.mercadoLibre.cards', {
url: '/cards',
views: {
'tab-home@tabs': {
controller: 'mercadoLibreCardsController',
templateUrl: 'views/mercadoLibreCards.html'
}
},
params: {
cardClaimCode: null
}
})
.state('tabs.giftcards.mercadoLibre.amount', {
url: '/amount',
views: {
'tab-home@tabs': {
controller: 'amountController',
templateUrl: 'views/amount.html'
}
},
params: {
nextStep: 'tabs.giftcards.mercadoLibre.buy',
currency: 'BRL',
forceCurrency: true
}
})
.state('tabs.giftcards.mercadoLibre.buy', {
url: '/buy/:amount/:currency',
views: {
'tab-home@tabs': {
controller: 'buyMercadoLibreController',
templateUrl: 'views/buyMercadoLibre.html'
}
}
})
/*
*
* Amazon.com Gift Card

View file

@ -0,0 +1,196 @@
'use strict';
angular.module('copayApp.services').factory('mercadoLibreService', function($http, $log, lodash, moment, storageService, configService, platformInfo, nextStepsService, homeIntegrationsService) {
var root = {};
var credentials = {};
// Not used yet
var availableCountries = [{
'country': 'Brazil',
'currency': 'BRL',
'name': 'Mercado Livre',
'url': 'https://www.mercadolivre.com.br'
}];
/*
* Development: 'testnet'
* Production: 'livenet'
*/
//credentials.NETWORK = 'livenet';
credentials.NETWORK = 'testnet';
if (credentials.NETWORK == 'testnet') {
credentials.BITPAY_API_URL = "https://test.bitpay.com";
} else {
credentials.BITPAY_API_URL = "https://bitpay.com";
};
var homeItem = {
name: 'mercadoLibre',
title: 'Mercado Libre',
icon: 'icon-ml',
sref: 'tabs.giftcards.mercadoLibre',
};
var nextStepItem = {
name: 'mercadoLibre',
title: 'Buy Mercado Libre Gift Cards',
icon: 'icon-ml',
sref: 'tabs.giftcards.mercadoLibre',
};
var _getBitPay = function(endpoint) {
return {
method: 'GET',
url: credentials.BITPAY_API_URL + endpoint,
headers: {
'content-type': 'application/json'
}
};
};
var _postBitPay = function(endpoint, data) {
return {
method: 'POST',
url: credentials.BITPAY_API_URL + endpoint,
headers: {
'content-type': 'application/json'
},
data: data
};
};
root.getNetwork = function() {
return credentials.NETWORK;
};
root.savePendingGiftCard = function(gc, opts, cb) {
var network = root.getNetwork();
storageService.getMercadoLibreGiftCards(network, function(err, oldGiftCards) {
if (lodash.isString(oldGiftCards)) {
oldGiftCards = JSON.parse(oldGiftCards);
}
if (lodash.isString(gc)) {
gc = JSON.parse(gc);
}
var inv = oldGiftCards || {};
inv[gc.invoiceId] = gc;
if (opts && (opts.error || opts.status)) {
inv[gc.invoiceId] = lodash.assign(inv[gc.invoiceId], opts);
}
if (opts && opts.remove) {
delete(inv[gc.invoiceId]);
}
inv = JSON.stringify(inv);
storageService.setMercadoLibreGiftCards(network, inv, function(err) {
homeIntegrationsService.register(homeItem);
nextStepsService.unregister(nextStepItem.name);
return cb(err);
});
});
};
root.getPendingGiftCards = function(cb) {
var network = root.getNetwork();
storageService.getMercadoLibreGiftCards(network, function(err, giftCards) {
var _gcds = giftCards ? JSON.parse(giftCards) : null;
return cb(err, _gcds);
});
};
root.createBitPayInvoice = function(data, cb) {
// TODO
var dataSrc = {
currency: 'USD' || data.currency,
amount: data.amount,
clientId: data.uuid
};
console.log('[mercadoLibreService.js:106]',dataSrc); //TODO
$http(_postBitPay('/amazon-gift/pay', dataSrc)).then(function(data) {
$log.info('BitPay Create Invoice: SUCCESS');
return cb(null, data.data);
}, function(data) {
$log.error('BitPay Create Invoice: ERROR ' + data.data.message);
return cb(data.data);
});
};
root.getBitPayInvoice = function(id, cb) {
$http(_getBitPay('/invoices/' + id)).then(function(data) {
$log.info('BitPay Get Invoice: SUCCESS');
return cb(null, data.data.data);
}, function(data) {
$log.error('BitPay Get Invoice: ERROR ' + data.data.error);
return cb(data.data.error);
});
};
root.createGiftCard = function(data, cb) {
console.log('[mercadoLibreService.js:132]',data); //TODO
return cb(null, {
"id": "f2bd6204fc49661a56057d33e37e32f2518ae92eea2f5457c379434712e35537",
"currency_id": data.currency,
"external_reference": "external_id_123456",
"initial_amount": data.amount,
"balance": 59.99,
"status": "active",
"date_creation": "2017­03­14T10:39:14.826­03:00",
"date_activation": "2017­03­14T10:39:15.316­03:00",
"date_expiration": "2018­09­14T10:39:15.316­03:00",
"date_last_updated": "2017­03­14T10:39:15.321­03:00",
"pin": "UYNHSIONUY"
});
var dataSrc = {
"clientId": data.uuid,
"invoiceId": data.invoiceId,
"accessKey": data.accessKey
};
$http(_postBitPay('/mercado-libre-gift/redeem', dataSrc)).then(function(data) {
var status = data.data.status == 'new' ? 'PENDING' : (data.data.status == 'paid') ? 'PENDING' : data.data.status;
data.data.status = status;
$log.info('Mercado Libre Gift Card Create/Update: ' + status);
return cb(null, data.data);
}, function(data) {
$log.error('Mercado Libre Gift Card Create/Update: ' + data.data.message);
return cb(data.data);
});
};
root.cancelGiftCard = function(data, cb) {
var dataSrc = {
"clientId": data.uuid,
"invoiceId": data.invoiceId,
"accessKey": data.accessKey
};
$http(_postBitPay('/mercado-libre-gift/cancel', dataSrc)).then(function(data) {
$log.info('Mercado Libre Gift Card Cancel: SUCCESS');
return cb(null, data.data);
}, function(data) {
$log.error('Mercado Libre Gift Card Cancel: ' + data.data.message);
return cb(data.data);
});
};
var register = function() {
storageService.getMercadoLibreGiftCards(root.getNetwork(), function(err, giftCards) {
if (giftCards) {
homeIntegrationsService.register(homeItem);
} else {
nextStepsService.register(nextStepItem);
}
});
};
register();
return root;
});

View file

@ -610,5 +610,17 @@ angular.module('copayApp.services')
storage.remove('txConfirmNotif-' + txid, cb);
};
root.setMercadoLibreGiftCards = function(network, gcs, cb) {
storage.set('mercadoLibreGiftCards-' + network, gcs, cb);
};
root.getMercadoLibreGiftCards = function(network, cb) {
storage.get('mercadoLibreGiftCards-' + network, cb);
};
root.removeMercadoLibreGiftCards = function(network, cb) {
storage.remove('MercadoLibreGiftCards-' + network, cb);
};
return root;
});

View file

@ -1,6 +1,7 @@
@import "coinbase";
@import "glidera";
@import "amazon";
@import "mercadolibre";
#coinbase, #glidera {
.button-small {

View file

@ -0,0 +1,141 @@
#mercadolibre {
$item-lateral-padding: 20px;
$item-vertical-padding: 10px;
$item-border-color: #EFEFEF;
$item-label-color: #6C6C6E;
@extend .deflash-blue;
.icon-amazon {
background-image: url("../img/mercado-libre/icon-ml.svg");
}
.spinner svg {
stroke: black;
fill: black;
}
.add-bottom-for-cta {
bottom: 92px;
}
.head {
padding: 30px $item-lateral-padding 4rem;
border-top: 0;
.sending-label {
display: flex;
font-size: 18px;
align-items: center;
margin-bottom: 1.8rem;
img {
margin-right: 1rem;
height: 35px;
width: 35px;
}
span {
text-transform: capitalize;
}
.big-icon-svg {
margin-right: 0.6rem;
}
}
.amount-label{
line-height: 30px;
.amount{
font-size: 38px;
margin-bottom: .5rem;
> .unit {
font-family: "Roboto-Light";
}
}
.alternative {
font-size: 12px;
font-family: "Roboto-Light";
color: #9B9B9B;
}
}
}
.item {
border-color: $item-border-color;
}
.info {
.badge {
border-radius: 0;
padding: .5rem;
}
.item {
color: #4A4A4A;
padding-top: $item-vertical-padding;
padding-bottom: $item-vertical-padding;
padding-left: $item-lateral-padding;
&:not(.item-icon-right) {
padding-right: $item-lateral-padding;
}
.label {
font-size: 14px;
color: $item-label-color;
margin-bottom: 8px;
}
.capitalized {
text-transform: capitalize;
}
.wallet .big-icon-svg > .bg {
height: 24px;
width: 24px;
padding: 2px;
box-shadow: none;
vertical-align: middle;
}
.total-amount {
font-weight: bold;
}
&.single-line {
display: flex;
align-items: center;
padding-top: 17px;
padding-bottom: 17px;
.label {
margin: 0;
flex-grow: 1;
}
}
}
.item-divider {
padding-top: 1.2rem;
color: $item-label-color;
font-size: 15px;
}
.wallet {
display: flex;
align-items: center;
padding: .2rem 0;
margin-bottom: 5px;
~ .bp-arrow-right {
top: 14px;
}
> i {
padding: 0;
position: static;
> img {
height: 24px;
width: 24px;
padding: 2px;
margin-right: .7rem;
box-shadow: none;
}
}
}
}
}

View file

@ -17,6 +17,10 @@
.icon-amazon {
background-image: url("../img/icon-amazon.svg");
}
.icon-ml {
background-image: url("../img/mercado-libre/icon-ml.svg");
height: 27px;
}
.bg {
&.wallet {
padding: .25rem

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 63 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.6 KiB

View file

@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="379.138px" height="96.088px" viewBox="290.552 232.053 379.138 96.088"
enable-background="new 290.552 232.053 379.138 96.088" xml:space="preserve">
<g>
<g>
<path fill="#060E9F" d="M429.391,277.456c0-25.012-31.078-45.403-69.414-45.403c-38.339,0-69.417,20.392-69.417,45.403
c0,0.646-0.008,2.432-0.008,2.658c0,26.536,27.164,48.026,69.416,48.026c42.508,0,69.424-21.483,69.424-48.021
C429.391,279.192,429.391,278.659,429.391,277.456z"/>
<ellipse fill="#FFD100" cx="359.988" cy="277.433" rx="66.747" ry="42.7"/>
<g>
<path fill="#FFFFFF" d="M337.823,263.963c-0.034,0.066-0.7,0.755-0.268,1.309c1.053,1.346,4.306,2.117,7.597,1.379
c1.959-0.439,4.47-2.438,6.902-4.367c2.637-2.094,5.252-4.189,7.878-5.023c2.785-0.887,4.568-0.506,5.746-0.15
c1.293,0.386,2.812,1.236,5.238,3.057c4.565,3.434,22.93,19.462,26.104,22.232c2.555-1.152,13.912-6.042,29.346-9.445
c-1.342-8.228-6.344-15.756-13.936-21.919c-10.582,4.444-23.506,6.761-36.15,0.587c-0.063-0.025-6.905-3.265-13.655-3.105
c-10.032,0.233-14.378,4.574-18.977,9.17L337.823,263.963z"/>
<path fill="#FFFFFF" d="M396.275,284.143c-0.217-0.192-21.592-18.896-26.436-22.537c-2.804-2.102-4.361-2.639-5.998-2.848
c-0.853-0.109-2.029,0.048-2.854,0.273c-2.252,0.613-5.199,2.582-7.813,4.656c-2.707,2.157-5.262,4.188-7.632,4.719
c-3.026,0.679-6.723-0.123-8.409-1.264c-0.685-0.458-1.164-0.99-1.396-1.529c-0.623-1.444,0.526-2.6,0.715-2.793l5.899-6.381
c0.687-0.684,1.376-1.369,2.085-2.043c-1.904,0.248-3.664,0.733-5.378,1.211c-2.137,0.6-4.194,1.172-6.273,1.17
c-0.868,0-5.521-0.762-6.402-1.001c-5.341-1.461-10.025-2.884-17.024-6.152c-8.387,6.243-13.995,14.05-15.615,22.647
c1.204,0.318,3.146,0.896,3.962,1.078c18.979,4.22,24.89,8.566,25.961,9.474c1.161-1.293,2.837-2.109,4.705-2.109
c2.102,0.003,3.992,1.056,5.145,2.688c1.086-0.858,2.585-1.594,4.522-1.592c0.881,0,1.792,0.162,2.715,0.478
c2.142,0.733,3.246,2.16,3.819,3.451c0.717-0.324,1.602-0.564,2.642-0.562c1.021,0,2.086,0.232,3.156,0.695
c3.499,1.502,4.043,4.939,3.727,7.529c0.25-0.027,0.502-0.039,0.756-0.039c4.148,0.002,7.523,3.375,7.523,7.524
c0,1.285-0.328,2.492-0.9,3.554c1.129,0.635,4.006,2.069,6.535,1.75c2.016-0.254,2.783-0.943,3.057-1.332
c0.189-0.269,0.387-0.58,0.203-0.806l-5.354-5.946c0,0-0.882-0.834-0.591-1.154c0.302-0.332,0.847,0.143,1.232,0.465
c2.725,2.275,6.051,5.711,6.051,5.711c0.06,0.037,0.277,0.473,1.508,0.693c1.062,0.188,2.935,0.08,4.232-0.986
c0.326-0.27,0.654-0.607,0.932-0.953c-0.022,0.018-0.041,0.039-0.062,0.049c1.371-1.754-0.152-3.524-0.152-3.524l-6.252-7.021
c0,0-0.895-0.827-0.588-1.157c0.271-0.289,0.846,0.146,1.238,0.473c1.979,1.654,4.774,4.459,7.455,7.088
c0.524,0.383,2.879,1.838,6-0.209c1.895-1.242,2.272-2.77,2.219-3.918c-0.131-1.523-1.32-2.609-1.32-2.609l-8.537-8.586
c0,0-0.903-0.771-0.584-1.16c0.262-0.328,0.844,0.146,1.23,0.465c2.719,2.277,10.082,9.029,10.082,9.029
c0.106,0.074,2.649,1.887,5.795-0.115c1.125-0.721,1.844-1.803,1.901-3.062C397.814,285.439,396.275,284.143,396.275,284.143z"/>
<path fill="#FFFFFF" d="M354.853,295.025c-1.324-0.017-2.773,0.772-2.962,0.656c-0.105-0.066,0.081-0.601,0.204-0.906
c0.129-0.306,1.873-5.553-2.379-7.373c-3.253-1.398-5.243,0.174-5.928,0.883c-0.178,0.186-0.259,0.172-0.277-0.064
c-0.066-0.945-0.488-3.502-3.296-4.359c-4.014-1.227-6.595,1.572-7.249,2.585c-0.292-2.287-2.227-4.062-4.595-4.064
c-2.572-0.004-4.659,2.08-4.662,4.652c-0.002,2.571,2.084,4.659,4.657,4.659c1.25,0.005,2.385-0.495,3.221-1.299
c0.026,0.023,0.036,0.066,0.023,0.156c-0.196,1.152-0.557,5.336,3.827,7.041c1.758,0.684,3.253,0.176,4.492-0.693
c0.369-0.26,0.429-0.149,0.377,0.197c-0.158,1.076,0.043,3.381,3.273,4.689c2.458,1,3.913-0.021,4.866-0.904
c0.416-0.377,0.529-0.314,0.551,0.27c0.117,3.115,2.704,5.591,5.848,5.593c3.239,0.004,5.864-2.613,5.866-5.853
C360.713,297.654,358.09,295.062,354.853,295.025z"/>
</g>
<path fill="#060E9F" d="M397.102,281.902c-6.586-5.746-21.803-18.979-25.924-22.071c-2.355-1.772-3.963-2.706-5.373-3.127
c-0.631-0.191-1.51-0.409-2.637-0.411c-1.05,0-2.177,0.19-3.351,0.564c-2.665,0.844-5.32,2.952-7.885,4.992l-0.132,0.104
c-2.393,1.901-4.863,3.868-6.733,4.284c-0.817,0.184-1.656,0.279-2.493,0.279c-2.096-0.004-3.979-0.607-4.684-1.507
c-0.116-0.149-0.04-0.39,0.23-0.735l0.035-0.047l5.795-6.242c4.537-4.537,8.823-8.822,18.688-9.049
c0.164-0.005,0.33-0.008,0.492-0.008c6.141,0.005,12.278,2.753,12.969,3.072c5.758,2.808,11.701,4.234,17.674,4.239
c6.226,0.001,12.65-1.538,19.404-4.649c-0.756-0.635-1.541-1.252-2.349-1.857c-5.934,2.572-11.586,3.872-17.043,3.871
c-5.567-0.006-11.133-1.344-16.536-3.98c-0.285-0.136-7.062-3.332-14.115-3.335c-0.187,0-0.373,0.003-0.558,0.007
c-8.286,0.194-12.955,3.136-16.094,5.714c-3.052,0.075-5.686,0.812-8.03,1.466c-2.091,0.58-3.896,1.085-5.657,1.084
c-0.727,0-2.031-0.066-2.148-0.071c-2.026-0.062-12.229-2.564-20.348-5.638c-0.829,0.587-1.625,1.192-2.402,1.811
c8.479,3.477,18.799,6.164,22.056,6.375c0.906,0.06,1.872,0.162,2.838,0.164c2.153,0,4.305-0.604,6.386-1.187
c1.229-0.345,2.586-0.721,4.013-0.993c-0.382,0.373-0.762,0.752-1.144,1.135l-5.886,6.367c-0.463,0.467-1.469,1.715-0.806,3.252
c0.263,0.619,0.799,1.213,1.547,1.717c1.403,0.944,3.914,1.584,6.247,1.585c0.883,0.001,1.724-0.087,2.492-0.261
c2.469-0.553,5.057-2.615,7.797-4.795c2.187-1.734,5.288-3.939,7.665-4.586c0.666-0.181,1.48-0.293,2.137-0.293
c0.197,0.002,0.381,0.008,0.554,0.033c1.567,0.199,3.086,0.732,5.797,2.766c4.832,3.631,26.209,22.333,26.42,22.517
c0.014,0.013,1.377,1.188,1.283,3.144c-0.052,1.092-0.656,2.061-1.709,2.729c-0.912,0.58-1.854,0.875-2.806,0.875
c-1.43-0.004-2.412-0.672-2.479-0.719c-0.078-0.064-7.402-6.781-10.101-9.037c-0.43-0.354-0.846-0.677-1.266-0.677
c-0.228,0-0.426,0.096-0.562,0.265c-0.424,0.521,0.052,1.246,0.611,1.722l8.555,8.604c0.013,0.008,1.066,0.996,1.185,2.316
c0.065,1.426-0.613,2.618-2.031,3.547c-1.01,0.666-2.031,1.004-3.033,1.004c-1.315,0-2.235-0.599-2.44-0.742l-1.228-1.209
c-2.244-2.207-4.561-4.49-6.256-5.904c-0.414-0.344-0.854-0.662-1.274-0.662c-0.209,0-0.396,0.076-0.539,0.23
c-0.193,0.215-0.328,0.602,0.155,1.242c0.195,0.264,0.433,0.479,0.433,0.479l6.242,7.015c0.051,0.062,1.286,1.53,0.143,2.991
l-0.221,0.279c-0.189,0.205-0.39,0.396-0.582,0.562c-1.064,0.875-2.486,0.967-3.052,0.967c-0.303,0-0.592-0.025-0.844-0.07
c-0.615-0.111-1.031-0.283-1.229-0.52l-0.078-0.078c-0.34-0.354-3.486-3.566-6.09-5.74c-0.345-0.287-0.771-0.648-1.215-0.648
c-0.22,0-0.412,0.084-0.564,0.25c-0.514,0.564,0.26,1.408,0.588,1.717l5.322,5.875c-0.006,0.052-0.07,0.172-0.199,0.357
c-0.191,0.264-0.836,0.91-2.768,1.152c-0.232,0.031-0.474,0.043-0.707,0.043c-1.994,0-4.117-0.969-5.216-1.547
c0.5-1.055,0.759-2.215,0.759-3.375c0.004-4.385-3.558-7.949-7.94-7.953c-0.094,0-0.193,0.004-0.287,0.006
c0.144-2.002-0.14-5.791-4.028-7.459c-1.119-0.484-2.236-0.732-3.321-0.732c-0.85,0-1.668,0.146-2.437,0.441
c-0.805-1.566-2.145-2.707-3.889-3.303c-0.966-0.334-1.926-0.502-2.852-0.502c-1.619,0-3.111,0.477-4.44,1.424
c-1.274-1.586-3.199-2.525-5.226-2.525c-1.773,0-3.48,0.71-4.744,1.962c-1.658-1.266-8.234-5.443-25.833-9.438
c-0.854-0.193-2.809-0.754-4.007-1.105c-0.199,0.953-0.352,1.916-0.45,2.889c0,0,3.246,0.776,3.884,0.92
c17.979,3.994,23.921,8.146,24.925,8.931c-0.34,0.816-0.518,1.699-0.519,2.584c-0.002,3.717,3.019,6.742,6.735,6.746
c0.416,0,0.829-0.037,1.235-0.115c0.56,2.736,2.348,4.809,5.082,5.871c0.799,0.307,1.607,0.463,2.4,0.463
c0.514,0.004,1.028-0.061,1.533-0.189c0.506,1.281,1.641,2.88,4.183,3.912c0.889,0.357,1.778,0.545,2.646,0.545
c0.706,0,1.397-0.125,2.058-0.366c1.217,2.965,4.114,4.93,7.343,4.93c2.14,0.002,4.193-0.871,5.693-2.414
c1.281,0.716,3.99,2.007,6.728,2.011c0.352,0,0.684-0.025,1.018-0.064c2.716-0.344,3.98-1.408,4.562-2.232
c0.104-0.145,0.199-0.297,0.281-0.457c0.641,0.185,1.346,0.334,2.153,0.338c1.482,0,2.906-0.506,4.347-1.555
c1.414-1.021,2.422-2.482,2.563-3.73c0.004-0.016,0.004-0.034,0.006-0.053c0.479,0.099,0.967,0.146,1.455,0.146
c1.529,0,3.031-0.475,4.465-1.416c2.771-1.814,3.25-4.188,3.203-5.738c0.488,0.102,0.982,0.152,1.476,0.152
c1.432,0,2.842-0.432,4.182-1.287c1.717-1.098,2.752-2.777,2.91-4.732c0.104-1.328-0.226-2.672-0.924-3.824
c4.639-1.998,15.243-5.866,27.731-8.679c-0.072-0.969-0.215-1.925-0.389-2.878C411.198,275.767,399.926,280.646,397.102,281.902z
M354.853,306.326c-2.937-0.004-5.32-2.283-5.428-5.189c-0.009-0.25-0.034-0.912-0.597-0.912c-0.229,0-0.429,0.14-0.658,0.349
c-0.646,0.598-1.469,1.204-2.667,1.204c-0.547,0-1.135-0.127-1.759-0.381c-3.098-1.258-3.141-3.385-3.016-4.239
c0.034-0.229,0.046-0.466-0.113-0.65l-0.189-0.17h-0.192c-0.156,0-0.319,0.063-0.538,0.217c-0.896,0.632-1.757,0.937-2.631,0.937
c-0.48,0-0.975-0.096-1.468-0.285c-4.081-1.588-3.759-5.439-3.56-6.598c0.03-0.236-0.028-0.418-0.178-0.539l-0.288-0.236
l-0.269,0.258c-0.795,0.766-1.835,1.186-2.928,1.186c-2.338-0.002-4.238-1.899-4.237-4.239c0.001-2.336,1.905-4.231,4.242-4.229
c2.11,0,3.908,1.588,4.178,3.696l0.146,1.14l0.625-0.964c0.07-0.112,1.782-2.7,4.932-2.698c0.598,0,1.217,0.096,1.84,0.289
c2.507,0.766,2.934,3.041,2.998,3.987c0.046,0.554,0.438,0.58,0.515,0.58c0.218,0,0.377-0.139,0.49-0.258
c0.473-0.494,1.504-1.316,3.118-1.316c0.739,0.005,1.522,0.181,2.337,0.527c3.988,1.711,2.18,6.778,2.158,6.832
c-0.345,0.84-0.357,1.211-0.035,1.424l0.157,0.074h0.116c0.18,0,0.402-0.076,0.772-0.201c0.542-0.188,1.36-0.471,2.127-0.471
h0.002c3.003,0.034,5.443,2.479,5.443,5.444C360.297,303.889,357.852,306.326,354.853,306.326z"/>
</g>
<g>
<g>
<path fill="#060E9F" d="M665.93,248.525c-2.504-3.14-6.31-4.708-11.412-4.708c-5.1,0-8.904,1.568-11.408,4.708
c-2.508,3.138-3.762,6.847-3.762,11.126c0,4.355,1.254,8.077,3.762,11.176c2.504,3.088,6.31,4.638,11.408,4.638
c5.104,0,8.908-1.55,11.412-4.638c2.508-3.099,3.76-6.82,3.76-11.176C669.689,255.372,668.438,251.663,665.93,248.525z
M659.723,266.534c-1.217,1.613-2.955,2.42-5.23,2.42c-2.268,0-4.016-0.807-5.241-2.42c-1.227-1.613-1.837-3.908-1.837-6.883
c0-2.971,0.609-5.261,1.837-6.865c1.227-1.604,2.975-2.406,5.241-2.406c2.275,0,4.015,0.802,5.23,2.406
c1.213,1.604,1.824,3.895,1.824,6.865C661.547,262.625,660.936,264.92,659.723,266.534z"/>
<path fill="#060E9F" d="M601.895,245.9c-2.539-1.289-5.449-1.939-8.721-1.939c-5.031,0-8.582,1.313-10.648,3.933
c-1.299,1.679-2.029,3.817-2.199,6.422h7.519c0.184-1.149,0.553-2.06,1.106-2.732c0.775-0.909,2.093-1.364,3.957-1.364
c1.664,0,2.922,0.229,3.785,0.697c0.854,0.463,1.287,1.307,1.287,2.525c0,1.004-0.559,1.738-1.68,2.214
c-0.627,0.273-1.662,0.501-3.115,0.683l-2.664,0.327c-3.025,0.382-5.324,1.022-6.879,1.915c-2.848,1.641-4.269,4.287-4.269,7.949
c0,2.82,0.88,5.006,2.65,6.543c1.764,1.539,4.012,2.185,6.721,2.311c16.998,0.758,16.806-8.957,16.961-10.977v-11.184
C605.706,249.637,604.436,247.194,601.895,245.9z M597.947,262.868c-0.051,2.605-0.799,4.398-2.229,5.381
c-1.435,0.986-3,1.479-4.699,1.479c-1.076,0-1.986-0.299-2.736-0.889c-0.748-0.592-1.119-1.555-1.119-2.884
c0-1.492,0.609-2.593,1.836-3.305c0.729-0.418,1.919-0.776,3.58-1.062l1.775-0.329c0.883-0.168,1.578-0.346,2.086-0.538
c0.514-0.187,1.01-0.435,1.508-0.747L597.947,262.868L597.947,262.868z"/>
<path fill="#060E9F" d="M563.139,250.623c1.942,0,3.369,0.599,4.291,1.799c0.633,0.888,1.026,1.89,1.182,2.998h8.385
c-0.461-4.229-1.94-7.183-4.438-8.854c-2.506-1.667-5.717-2.506-9.644-2.506c-4.618,0-8.245,1.418-10.864,4.249
c-2.625,2.835-3.939,6.798-3.939,11.89c0,4.51,1.188,8.186,3.564,11.018c2.375,2.831,6.082,4.249,11.119,4.249
c5.043,0,8.848-1.699,11.411-5.095c1.609-2.104,2.513-4.338,2.701-6.701h-8.354c-0.17,1.562-0.658,2.835-1.467,3.814
c-0.808,0.979-2.164,1.471-4.087,1.471c-2.704,0-4.549-1.232-5.526-3.707c-0.535-1.318-0.808-3.066-0.808-5.239
c0-2.28,0.271-4.108,0.808-5.489C558.488,251.924,560.379,250.623,563.139,250.623z"/>
<path fill="#060E9F" d="M545.861,244.059c-17.221,0-16.203,15.248-16.203,15.248v15.488h7.816v-14.527
c0-2.381,0.303-4.143,0.896-5.289c1.072-2.031,3.166-3.051,6.293-3.051c0.236,0,0.545,0.013,0.929,0.03
c0.379,0.019,0.811,0.053,1.309,0.11v-7.952c-0.348-0.023-0.572-0.033-0.668-0.043
C546.131,244.065,546.008,244.059,545.861,244.059z"/>
<path fill="#060E9F" d="M517.154,266.703c-0.328,0.468-0.682,0.869-1.069,1.182c-1.104,0.909-2.604,1.188-4.369,1.188
c-1.67,0-2.978-0.254-4.16-1c-1.949-1.197-3.047-3.227-3.164-6.203h21.625c0.029-2.562-0.053-4.525-0.26-5.892
c-0.359-2.325-1.15-4.375-2.363-6.138c-1.35-2.001-3.064-3.465-5.133-4.395c-2.068-0.923-4.396-1.387-6.978-1.387
c-4.354,0-7.891,1.372-10.616,4.114c-2.728,2.748-4.097,6.688-4.097,11.83c0,5.49,1.512,9.451,4.535,11.885
c3.018,2.438,6.508,3.654,10.457,3.654c4.785,0,8.51-1.441,11.168-4.331c1.435-1.519,2.332-3.023,2.711-4.506H517.154z
M506.648,252.153c1.1-1.131,2.644-1.697,4.635-1.697c1.834,0,3.365,0.533,4.605,1.602c1.233,1.065,1.926,2.632,2.063,4.688
H504.58C504.861,254.813,505.553,253.284,506.648,252.153z"/>
<g>
<path fill="#060E9F" d="M493.434,274.793h-7.139v-17.977c0-1.641-0.543-5.547-5.252-5.547c-3.14,0-5.41,2.264-5.41,5.547v17.977
h-7.146v-17.977c0-1.641-0.488-5.547-5.192-5.547c-3.193,0-5.414,2.264-5.414,5.547v17.977h-7.144v-17.805
c0-7.422,4.924-13.033,12.558-13.033c3.788,0,6.87,1.59,8.877,4.141c2.106-2.55,5.245-4.141,8.873-4.141
c7.793,0,12.391,5.384,12.391,13.033L493.434,274.793L493.434,274.793z"/>
</g>
<path fill="#060E9F" d="M637.023,234.671c0,0-7.871-0.841-7.871,5.483l-0.008,8.372c-0.869-1.398-2.004-2.492-3.402-3.281
c-1.395-0.789-2.991-1.186-4.795-1.186c-3.903,0-7.016,1.454-9.352,4.357c-2.336,2.907-3.498,7.096-3.498,12.16
c0,4.395,1.184,7.998,3.553,10.803c2.371,2.802,7.019,4.032,11.144,4.032c14.391,0,14.225-12.341,14.225-12.341L637.023,234.671z
M627.65,266.598c-1.141,1.635-2.817,2.451-5.01,2.451c-2.201,0-3.838-0.824-4.916-2.465c-1.08-1.646-1.619-4.041-1.619-6.781
c0-2.543,0.527-4.672,1.592-6.387c1.06-1.715,2.724-2.574,4.994-2.574c1.49,0,2.797,0.472,3.926,1.415
c1.832,1.562,2.75,4.364,2.75,7.993C629.366,262.848,628.793,264.963,627.65,266.598z"/>
</g>
<g>
<path fill="#060E9F" d="M601.329,312.088c-0.321,0.465-0.678,0.859-1.059,1.168c-1.094,0.896-2.637,1.229-4.377,1.229
c-1.646,0-2.941-0.243-4.109-0.987c-1.932-1.181-2.955-3.242-3.073-6.19h21.385c0.024-2.529-0.055-4.474-0.26-5.818
c-0.357-2.303-1.14-4.33-2.336-6.074c-1.337-1.977-3.031-3.424-5.076-4.342c-2.049-0.916-4.349-1.373-6.898-1.373
c-4.311,0-7.801,1.355-10.5,4.068c-2.693,2.717-4.043,6.608-4.043,11.694c0,5.429,1.49,9.349,4.479,11.752
c2.985,2.408,6.438,3.613,10.342,3.613c4.729,0,8.412-1.429,11.041-4.281c1.416-1.506,2.307-2.991,2.684-4.457L601.329,312.088
L601.329,312.088z M590.945,297.699c1.086-1.115,2.613-1.676,4.58-1.676c1.81,0,3.328,0.524,4.551,1.584
c1.224,1.053,1.908,2.6,2.048,4.635h-13.226C589.18,300.332,589.859,298.818,590.945,297.699z"/>
<path fill="#060E9F" d="M579.45,289.676c-0.104-0.008-0.225-0.012-0.366-0.012c-17.183,0-16.164,15.205-16.164,15.205v15.211
h7.795v-14.252c0-2.375,0.299-4.135,0.899-5.275c1.064-2.023,3.156-3.043,6.271-3.043c0.242,0,0.545,0.008,0.924,0.029
c0.381,0.02,0.813,0.053,1.307,0.107v-7.931C579.77,289.695,579.547,289.686,579.45,289.676z"/>
<path fill="#060E9F" d="M510.323,285.703c0,5.889,0,34.377,0,34.377h7.314v-39.968
C517.639,280.112,510.323,279.816,510.323,285.703z"/>
<g>
<rect x="523.643" y="280.069" fill="#060E9F" width="7.828" height="7.753"/>
<rect x="523.643" y="290.469" fill="#060E9F" width="7.846" height="29.611"/>
</g>
<g>
<path fill="#060E9F" d="M552.406,320.186h-7.932l-10.394-29.717h8.271l5.918,20.891l5.25-18.207
c0.598-1.788,1.787-2.684,3.574-2.684h5.812L552.406,320.186z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,85 @@
<ion-view id="mercadolibre" hide-tabs>
<ion-nav-bar class="bar-royal">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>Buy</ion-nav-title>
</ion-nav-bar>
<ion-content class="add-bottom-for-cta">
<!-- BUY -->
<div class="list">
<div class="item head">
<div class="sending-label">
<i class="icon big-icon-svg">
<div class="bg icon-amazon"></div>
</i>
<span>Mercado Libre Gift Card</span>
</div>
<div class="amount-label">
<div class="amount">{{amountUnitStr}}</div>
</div>
</div>
<div class="info">
<div class="item item-icon-right" ng-click="showWalletSelector()">
<div class="label">From</div>
<div class="wallet">
<i class="icon big-icon-svg">
<img src="img/icon-wallet.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet ? wallet.name : '...'}}
</div>
<i class="icon bp-arrow-right"></i>
</div>
</div>
</div>
</ion-content>
<click-to-accept
ng-disabled="!wallet"
ng-click="buyConfirm()"
ng-if="!isCordova"
click-send-status="sendStatus"
has-wallet-chosen="wallet"
insufficient-funds="false"
no-matching-wallet="false">
Confirm purchase
</click-to-accept>
<slide-to-accept
ng-disabled="!wallet"
ng-if="isCordova"
slide-on-confirm="buyConfirm()"
slide-send-status="sendStatus"
has-wallet-chosen="wallet"
insufficient-funds="false"
no-matching-wallet="false">
Slide to buy
</slide-to-accept>
<slide-to-accept-success
slide-success-show="sendStatus === 'success'"
slide-success-on-confirm="goBackHome()"
slide-success-hide-on-confirm="true">
<span ng-show="mlGiftCard.status == 'FAILURE'">
Your purchase could not be completed
</span>
<span ng-show="mlGiftCard.status == 'PENDING'">
Your purchase was added to the list of pending
</span>
<span ng-show="mlGiftCard.status == 'SUCCESS' || mlGiftCard.status == 'active'">
Bought {{mlGiftCard.amount}} {{mlGiftCard.currency}}
</span>
<div class="m10 size-14" ng-show="mlGiftCard.status == 'SUCCESS' || mlGiftCard.status == 'active'">
Gift card generated and ready to use.
</div>
</slide-to-accept-success>
<wallet-selector
wallet-selector-title="walletSelectorTitle"
wallet-selector-wallets="wallets"
wallet-selector-selected-wallet="wallet"
wallet-selector-show="showWallets"
wallet-selector-on-select="onWalletSelect">
</wallet-selector>
</ion-view>

View file

@ -0,0 +1,56 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>Mercado Libre Gift Cards</ion-nav-title>
</ion-nav-bar>
<ion-content scroll="false" class="ng-hide" ng-show="!giftCards">
<div class="box-notification warning" ng-show="network == 'testnet'">
Sandbox version. Only for testing purpose.
</div>
<div class="integration-onboarding">
<div class="integration-onboarding-logo">
<img src="img/mercado-libre/mlbr.svg" alt="Mercado Libre" width="250">
</div>
<div class="integration-onboarding-description">
Gift Cards are only redeemable on Mercado Livre (Brazil)
</div>
<div class="integration-onboarding-cta" ng-show="!showOauthForm">
<button class="button button-standard button-primary" ui-sref="tabs.giftcards.mercadoLibre.amount" no-low-fee>Buy a Gift Card</button>
<button class="button button-standard button-secondary"
ng-click="openExternalLink('https://www.mercadolivre.com.br')">Visit mercadolivre.com.br &rarr;</button>
</div>
</div>
</ion-content>
<ion-content class="ng-hide" ng-show="giftCards">
<div class="box-notification warning" ng-show="network == 'testnet'">
Sandbox version. Only for testing purpose.
</div>
<div class="m20t text-center">
<img src="img/mercado-libre/mlbr.svg" alt="Mercado Libre" width="250">
<div class="size-12 m10t">
<b>Only</b> redeemable on Mercado Livre (Brazil)
</div>
</div>
<div class="m20t" ng-if="giftCards">
<div class="list card">
<a class="item item-icon-left item-icon-right" href
ui-sref="tabs.giftcards.mercadoLibre.amount" no-low-fee>
<i class="icon ion-ios-pricetags-outline"></i>
Buy Gift Card
<i class="icon bp-arrow-right"></i>
</a>
<a class="item item-icon-right item-icon-left"
ui-sref="tabs.giftcards.mercadoLibre.cards">
<i class="icon ion-ios-folder-outline"></i>
Your cards
<i class="icon bp-arrow-right"></i>
</a>
</div>
</div>
</ion-content>
</ion-view>

View file

@ -0,0 +1,31 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>Your cards</ion-nav-title>
</ion-nav-bar>
<ion-content>
<div class="list card">
<div ng-repeat="(id, item) in giftCards | orderObjectBy:'date':true track by $index"
ng-click="openCardModal(item)"
class="item item-avatar"
ng-hide="hideCards">
<img src="img/mercado-libre/icon-ml.svg" alt="{{id}}" width="40">
<ion-spinner class="spinner-dark recent right m10 size-16" icon="crescent" ng-show="updatingPending[item.invoiceId]">
</ion-spinner>
<h2 ng-if="item.amount">
{{item.amount | currency : '$ ' : 2}} {{item.currency}}
</h2>
<p>
<span class="assertive" ng-if="item.status == 'FAILURE' || item.status == 'RESEND'">Error</span>
<span class="assertive" ng-if="item.status == 'expired'">Expired</span>
<span class="assertive" ng-if="item.status == 'invalid'">Still waiting confirmation<br> (Use higher fees setting to faster delivery)</span>
<span class="text-gray" ng-if="item.status == 'PENDING'">Pending to confirmation</span>
<span class="assertive" ng-if="item.status == 'SUCCESS' && item.cardStatus == 'Canceled'">Canceled</span>
<span class="text-gray">{{item.date | amTimeAgo}}</span>
</p>
</div>
</div>
</ion-content>
</ion-view>

View file

@ -0,0 +1,85 @@
<ion-modal-view ng-controller="mercadoLibreCardDetailsController">
<ion-header-bar align-title="center" class="bar-royal">
<button class="button button-back button-clear" ng-click="cancel()">
Close
</button>
<h1 class="title">Details</h1>
</ion-header-bar>
<ion-content>
<div class="header-modal text-center">
<img src="img/mercado-libre/giftcard-pt.svg" alt="Mercado Libre Gift Card" width="230" ng-click="refreshGiftCard()">
<div class="m10t">
Gift Card Amount:
<span class="text-bold">
{{card.amount | currency : '$ ' : 2}}
</span>
</div>
<div class="m10t">
Created
{{card.date | amTimeAgo}}
</div>
<div ng-show="card.claimCode">
<div ng-show="card.cardStatus !== 'Canceled'">
Claim code: <span class="text-bold" copy-to-clipboard="card.pin">{{card.pin}}</span>
</div>
<div class="m10t" ng-show="card.status == 'active'">
<button class="button button-positive"
ng-click="openExternalLink('https://www.mercadolivre.com.br/redeem?pin=' + card.pin)">
Redeem Now
</button>
</div>
<div class="m10t" ng-show="card.cardStatus == 'Canceled'">
<div class="m10t">
Status:
<span class="text-bold">
CANCELED
</span>
</div>
</div>
</div>
<div ng-show="!card.claimCode">
<div class="m10t">
Status:
<span class="text-bold" ng-show="card.status == 'PENDING'">
PENDING
</span>
<span class="text-bold" ng-show="card.status=='invalid'">
STILL PENDING
</span>
<span class="text-bold" ng-show="card.status == 'FAILURE' || card.status == 'RESEND'">
FAILURE
</span>
<span class="text-bold" ng-show="card.status == 'expired'">
EXPIRED
</span>
</div>
</div>
<div class="m10t text-center">
<a class="button button-clear button-calm" ng-click="openExternalLink(card.invoiceUrl)">See invoice</a>
</div>
</div>
<div class="box-notification warning" ng-show="card.status == 'FAILURE' || card.status == 'RESEND'">
There was a failure to the create gift card. Please, contact BitPay support.
</div>
<div class="list text-center">
<a class="item" ng-show="card.status == 'SUCCESS' && card.cardStatus == 'Fulfilled'" ng-click="cancelGiftCard()">
<span class="assertive">Cancel</span>
</a>
<a class="item" ng-show="card.status == 'FAILURE' || card.cardStatus == 'Canceled'
|| card.cardStatus == 'Expired' || card.status == 'expired'" ng-click="remove()">
<span class="assertive">Remove</span>
</a>
</div>
</ion-content>
</ion-modal-view>