diff --git a/env.example b/.env.example similarity index 100% rename from env.example rename to .env.example diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..596af21 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: PHP Test + +on: + push: + branches: [ "development" ] + pull_request: + branches: [ "development" ] +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + env: + PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }} + ENV: ${{ secrets.ENV }} + + steps: + - uses: actions/checkout@v3 + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: PHPStan analysis + run: vendor/bin/phpstan analyse tests --no-progress --no-interaction --error-format=table + + - name: Run test suite + run: ./vendor/bin/pest diff --git a/.gitignore b/.gitignore index da9764c..453ea4c 100644 --- a/.gitignore +++ b/.gitignore @@ -187,5 +187,11 @@ tmtags # Local History for Visual Studio Code .history/ -vendor - +vendor/ +composer.lock + +*.log +examples/*.log +examples/endpoint/*.log +example.php +.phpunit.result.cache diff --git a/README.md b/README.md index 204188a..bce45f0 100644 --- a/README.md +++ b/README.md @@ -99,26 +99,32 @@ The request will contain the following parameters. - ref `Your transaction reference. It must be unique per transaction. By default, the Rave class generates a unique transaction reference for each transaction. Pass this parameter only if you uncommented the related section in the script below.` ```php -// Prevent direct access to this class -define("BASEPATH", 1); +status == 'success'){ - if ($transactionData->currency == $_SESSION['currency'] && $transactionData->amount == $_SESSION['amount']){ - - if ($_SESSION['publicKey']){ - header('Location: '.getURL($_SESSION['successurl'], array('event' => 'successful'))); + // Get the transaction from your DB using the transaction reference (txref) + // Check if you have previously given value for the transaction. If you have, redirect to your successpage else, continue + // Comfirm that the transaction is successful + // Confirm that the chargecode is 00 or 0 + // Confirm that the currency on your db transaction is equal to the returned currency + // Confirm that the db transaction amount is equal to the returned amount + // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) + // Give value for the transaction + // Update the transaction to note that you have given value for the transaction + // You can also redirect to your success page from here + if ($transactionData->status === 'successful') { + if ($transactionData->currency == $_SESSION['currency'] && $transactionData->amount == $_SESSION['amount']) { + + if ($_SESSION['publicKey']) { + header('Location: ' . getURL($_SESSION['successurl'], array('event' => 'successful'))); $_SESSION = array(); session_destroy(); } - } else { - if($_SESSION['publicKey']){ - header('Location: '.getURL($_SESSION['failureurl'], array('event' => 'suspicious'))); + } else { + if ($_SESSION['publicKey']) { + header('Location: ' . getURL($_SESSION['failureurl'], array('event' => 'suspicious'))); $_SESSION = array(); session_destroy(); } - } - } else { - $this->onFailure($transactionData); - } + } + } else { + $this->onFailure($transactionData); + } } - + /** * This is called only when a transaction failed - **/ - function onFailure($transactionData){ - /** - * Get the transaction from your DB using the transaction reference (txref) - * Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) - * You can also redirect to your failure page from here - **/ - + * */ + function onFailure($transactionData) { + // Get the transaction from your DB using the transaction reference (txref) + // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) + // You can also redirect to your failure page from here if ($_SESSION['publicKey']) { - header('Location: '.getURL($_SESSION['failureurl'], array('event' => 'failed'))); + header('Location: ' . getURL($_SESSION['failureurl'], array('event' => 'failed'))); $_SESSION = array(); session_destroy(); } } - + /** * This is called when a transaction is requeryed from the payment gateway - **/ - function onRequery($transactionReference){ + * */ + function onRequery($transactionReference) { // Do something, anything! } - + /** * This is called a transaction requery returns with an error - **/ - function onRequeryError($requeryResponse){ - // Do something, anything! + * */ + function onRequeryError($requeryResponse) { + echo 'the transaction was not found'; } - + /** * This is called when a transaction is canceled by the user - **/ - function onCancel($transactionReference){ + * */ + function onCancel($transactionReference) { // Do something, anything! // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - if($_SESSION['publicKey']){ - header('Location: '.getURL($_SESSION['failureurl'], array('event' => 'canceled'))); + if ($_SESSION['publicKey']) { + header('Location: ' . getURL($_SESSION['failureurl'], array('event' => 'canceled'))); $_SESSION = array(); session_destroy(); } } - + /** * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. - **/ - function onTimeout($transactionReference, $data){ - /** - * Get the transaction from your DB using the transaction reference (txref) - * Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. - * Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects - **/ - if($_SESSION['publicKey']){ - header('Location: '.getURL($_SESSION['failureurl'], array('event' => 'timedout'))); + * */ + function onTimeout($transactionReference, $data) { + // Get the transaction from your DB using the transaction reference (txref) + // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. + // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects + if ($_SESSION['publicKey']) { + header('Location: ' . getURL($_SESSION['failureurl'], array('event' => 'timedout'))); $_SESSION = array(); session_destroy(); } } } -if($postData['amount']){ +if (isset($postData['amount'])) { // Make payment $payment - ->eventHandler(new myEventHandler) - ->setAmount($postData['amount']) - ->setPaymentOptions($postData['payment_options']) // value can be card, account or both - ->setDescription($postData['description']) - ->setLogo($postData['logo']) - ->setTitle($postData['title']) - ->setCountry($postData['country']) - ->setCurrency($postData['currency']) - ->setEmail($postData['email']) - ->setFirstname($postData['firstname']) - ->setLastname($postData['lastname']) - ->setPhoneNumber($postData['phonenumber']) - ->setPayButtonText($postData['pay_button_text']) - ->setRedirectUrl($URL) - // ->setMetaData(array('metaname' => 'SomeDataName', 'metavalue' => 'SomeValue')) // can be called multiple times. Uncomment this to add meta datas - // ->setMetaData(array('metaname' => 'SomeOtherDataName', 'metavalue' => 'SomeOtherValue')) // can be called multiple times. Uncomment this to add meta datas - ->initialize(); -}else{ - if($getData['cancelled'] && $getData['tx_ref']){ + ->eventHandler(new myEventHandler) + ->setAmount($postData['amount']) + ->setPaymentOptions($postData['payment_options']) // value can be card, account or both + ->setDescription($postData['description']) + ->setLogo($postData['logo']) + ->setTitle($postData['title']) + ->setCountry($postData['country']) + ->setCurrency($postData['currency']) + ->setEmail($postData['email']) + ->setFirstname($postData['firstname']) + ->setLastname($postData['lastname']) + ->setPhoneNumber($postData['phonenumber']) + ->setPayButtonText($postData['pay_button_text']) + ->setRedirectUrl($URL) + // ->setMetaData(array('metaname' => 'SomeDataName', 'metavalue' => 'SomeValue')) // can be called multiple times. Uncomment this to add meta datas + // ->setMetaData(array('metaname' => 'SomeOtherDataName', 'metavalue' => 'SomeOtherValue')) // can be called multiple times. Uncomment this to add meta datas + ->initialize(); +} else { + if (isset($getData['cancelled'])) { // Handle canceled payments $payment - ->eventHandler(new myEventHandler) - ->requeryTransaction($getData['tx_ref']) - ->paymentCanceled($getData['tx_ref']); - }elseif($getData['tx_ref']){ + ->eventHandler(new myEventHandler) + ->paymentCanceled($getData['cancel_ref']); + } elseif (isset($getData['tx_ref'])) { // Handle completed payments $payment->logger->notice('Payment completed. Now requerying payment.'); - $payment - ->eventHandler(new myEventHandler) - ->requeryTransaction($getData['tx_ref']); - }else{ - $payment->logger->warn('Stop!!! Please pass the txref parameter!'); + ->eventHandler(new myEventHandler) + ->requeryTransaction($getData['transaction_id']); + } else { + $payment->logger->warning('Stop!!! Please pass the txref parameter!'); echo 'Stop!!! Please pass the txref parameter!'; } } ```
+### Configuration settings +Create a .env file and add the bootstrap method first before initiating a charge. +```php +use \Flutterwave\Flutterwave; +# normal configuration +Flutterwave::bootstrap(); + +# for a custom configuration +# your config must implement Flutterwave\Contract\ConfigInterface +Flutterwave::bootstrap($myConfig); +``` + ### Account Charge -The following implementation shows how to initiate a direct bank charge. Use the Playground DIrectory to view Responses and samples of use. +The following implementation shows how to initiate a direct bank charge.
+want to see it work real time? a quick sample implementation can be found [here](https://github.com/Flutterwave/PHP/blob/fix/add-support-for-php7-8/examples/account.php). ```php -require("Flutterwave-Rave-PHP-SDK/library/AccountPayment.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\AccountPayment; - -//The data variable holds the payload -$data = array( - "amount" => "3000", - "type" => "debit_ng_account",//debit_ng_account or debit_uk_account - "account_bank" => "044", - "account_number" => "0690000037", - "currency" => "NGN",//NGN or GBP - "email" => "olaobajua@gmail.com", - "phone_number" => "07067965809", - "fullname" => "Olaobaju Abraham", - "client_ip" => "154.123.220.1", - "device_fingerprint" => "62wd23423rq324323qew1", - "meta" => [ - "flightID" => "213213AS" - ] - ); - -$payment = new AccountPayment(); -$result = $payment->accountCharge($data); - -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); -} -print_r($result); +use Flutterwave\Util\Currency; + +$data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => uniqid().time(), + "additionalData" => [ + "account_details" => [ + "account_bank" => "044", + "account_number" => "0690000034", + "country" => "NG" + ] + ], +]; + +$accountpayment = \Flutterwave\Flutterwave::create("account"); +$customerObj = $accountpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" +]); + +$data['customer'] = $customerObj; +$payload = $accountpayment->payload->create($data); +$result = $accountpayment->initiate($payload); ```
### ACH Charge -The following implementation shows how to accept payments directly from customers in the US and South Africa. Use the Playground DIrectory to view Responses and samples of use. +The following implementation shows how to accept payments directly from customers in the US and South Africa. a quick sample implementation can be found [here](https://github.com/Flutterwave/PHP/blob/fix/add-support-for-php7-8/examples/ach.php). ```php -require("Flutterwave-Rave-PHP-SDK/library/AchPayment.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\AchPayment; - -// The data variable holds the payload -$data = array( - "tx_ref" => "MC-1585230ew9v5050e8", - "amount" => "100", - "type" => "ach_payment", - "currency" => "USD", - "country" => "US", - "email" => "ekene@gmail.com", - "phone_number" => "0902620185", - "fullname" => "Ekene Eze", - "redirect_url" => "http://ekene.com/u/payment-completed", - ); - -$payment = new AchPayment(); - -$result = $payment->achCharge($data); -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); -} -print_r($result); - +use Flutterwave\Util\Currency; + +$data = [ + "amount" => 2000, + "currency" => Currency::ZAR, + "tx_ref" => uniqid().time(), + "redirectUrl" => "https://google.com" +]; + +$achpayment = \Flutterwave\Flutterwave::create("ach"); +$customerObj = $achpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" +]); + +$data['customer'] = $customerObj; +$payload = $achpayment->payload->create($data); + +$result = $achpayment->initiate($payload); ```
### Direct Card Charge -The following implementation shows how to initiate a card charge. Use the Playground Directory to view an implementation Responses and samples of use. +The following implementation shows how to initiate a card charge. a quick sample implementation can be found [here](https://github.com/Flutterwave/PHP/blob/fix/add-support-for-php7-8/examples/card.php) ```php -require("Flutterwave-Rave-PHP-SDK/library/CardPayment.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\CardPayment; - -//The data variable holds the payload -$data = array( - "card_number"=> "5531886652142950", - "cvv"=> "564", - "expiry_month"=> "09", - "expiry_year"=> "22", - "currency"=> "NGN", - "amount" => "1000", - "fullname"=> "Ekene Eze", - "email"=> "ekene@flw.com", - "phone_number"=> "0902620185", - "fullname" => "temi desola", - //"tx_ref"=> "MC-3243e",// should be unique for every transaction - "redirect_url"=> "https://webhook.site/3ed41e38-2c79-4c79-b455-97398730866c", - - ); - -$payment = new CardPayment(); -$res = $payment->cardCharge($data);//This call is to figure out the authmodel -$data['authorization']['mode'] = $res['meta']['authorization']['mode']; - -if($res['meta']['authorization']['mode'] == 'pin'){ - - //Supply authorization pin here - $data['authorization']['pin'] = '3310'; -} - -if($res['meta']['authorization']['mode'] == 'avs_noauth'){ - //supply avs details here - $data["authorization"] = array( - "mode" => "avs_noauth", - "city"=> "Sampleville", - "address"=> "3310 sample street ", - "state"=> "Simplicity", - "country"=> "Simple", - "zipcode"=> "000000", - ); -} - -$result = $payment->cardCharge($data);//charge with new fields -// print_r($result);//this returns the an array - -if($result['data']['auth_mode'] == 'otp'){ - $id = $result['data']['id']; - $flw_ref = $result['data']['flw_ref']; - $otp = '12345'; - $validate = $payment->validateTransaction($otp,$flw_ref);// you can print_r($validate) to see the response - $verify = $payment->verifyTransaction($id); -} +use Flutterwave\Util\Currency; + +$data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => "TEST-".uniqid().time(), + "redirectUrl" => "https://www.example.com", + "additionalData" => [ + "subaccounts" => [ + ["id" => "RSA_345983858845935893"] + ], + "meta" => [ + "unique_id" => uniqid().uniqid() + ], + "preauthorize" => false, + "payment_plan" => null, + "card_details" => [ + "card_number" => "5531886652142950", + "cvv" => "564", + "expiry_month" => "09", + "expiry_year" => "32" + ] + ], +]; + +$cardpayment = \Flutterwave\Flutterwave::create("card"); +$customerObj = $cardpayment->customer->create([ + "full_name" => "Olaobaju Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" +]); +$data['customer'] = $customerObj; +$payload = $cardpayment->payload->create($data); +$result = $cardpayment->initiate($payload); ``` ### Mobile Money Payments -The following implementation shows how to initiate a mobile money payment. Use the Playground Directory to view Responses and samples of use. +The following implementation shows how to initiate a mobile money payment. a quick sample implementation can be found [here](https://github.com/Flutterwave/PHP/blob/fix/add-support-for-php7-8/examples/momo.php). ```php -require("Flutterwave-Rave-PHP-SDK/library/MobileMoney.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\MobileMoney; - -// The data variable holds the payload -$data = array( - "order_id" => "USS_URG_89245453s2323", - "amount" => "1500", - "type" => "mobile_money_rwanda",// could be mobile_money_rwanda,mobile_money_uganda, mobile_money_zambia, mobile_money_ghana - "currency" => "RWF", - "email" => "ekene@flw.com", - "phone_number" => "054709929220", - "fullname" => "John Madakin", - "client_ip" => "154.123.220.1", - "device_fingerprint" => "62wd23423rq324323qew1", - "meta" => [ - "flightID" => "213213AS" - ] - ); - - -$payment = new MobileMoney(); -$result = $payment->mobilemoney($data); -$id = $result['data']['id']; -$verify = $payment->verifyTransaction($id); -$print_r($result); +use Flutterwave\Util\Currency; + +$data = [ + "amount" => 2000, + "currency" => Currency::XOF, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "network" => "MTN", + ] +]; + +$momopayment = \Flutterwave\Flutterwave::create("momo"); +$customerObj = $momopayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" +]); +$data['customer'] = $customerObj; +$payload = $momopayment->payload->create($data); +$result = $momopayment->initiate($payload); ``` ### USSD -Collect payments via ussd +Collect payments via ussd. a quick sample implementation can be found [here](https://github.com/Flutterwave/PHP/blob/fix/add-support-for-php7-8/examples/ussd.php) ```php -require("Flutterwave-Rave-PHP-SDK/library/Ussd.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Ussd; -//The data variable holds the payload -$data = array( - "tx_ref" => "MC-15852309v5050e8", - "account_bank" => "058", - "amount" => "1500", - "currency" =>"NGN", - "email" =>"user@gmail.com", - "phone_number" =>"054709929220", - "fullname" => "John Madakin", - - - ); - -$payment = new Ussd(); -$result = $payment->ussd($data);//initiates the charge - -echo 'Dial '.$result['meta']['authorization']['note'].' to authorize your transaction'; - -//A webhook notification would be sent to you.... - -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); -} - +use Flutterwave\Util\Currency; + +$data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "account_bank" => "044", + "account_number" => "000000000000" + ] +]; + +$ussdpayment = \Flutterwave\Flutterwave::create("ussd"); +$customerObj = $ussdpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" +]); +$data['customer'] = $customerObj; +$payload = $ussdpayment->payload->create($data); +$result = $ussdpayment->initiate($payload); ```
### Mpesa -Collect payments from your customers via Mpesa. +Collect payments from your customers via Mpesa.a quick sample implementation can be found [here](https://github.com/Flutterwave/PHP/blob/fix/add-support-for-php7-8/examples/mpesa.php) ```php -require("Flutterwave-Rave-PHP-SDK/library/Mpesa.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Mpesa; - -$data = array( - "amount" => "1500", - "type" => "mpesa", - "currency" => "KES", - "email" => "ekene@flw.com", - "phone_number" => "054709929220", - "fullname" => "Ekene Eze", - "client_ip" => "154.123.220.1", - "device_fingerprint" => "62wd23423rq324323qew1", - "meta" => [ - "flightID" => "213213AS" - ] - ); - -$payment = new Mpesa(); - -$result = $payment->mpesa($data); -print_r($result); -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); -} +use Flutterwave\Util\Currency; + +$data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => "https://google.com" +]; + +$mpesapayment = \Flutterwave\Flutterwave::create("mpesa"); +$customerObj = $mpesapayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" +]); +$data['customer'] = $customerObj; +$payload = $mpesapayment->payload->create($data); +$result = $mpesapayment->initiate($payload); ``` ### Transfer Implementation @@ -533,110 +503,54 @@ if(isset($result['data'])){ How to make a transfer payment ```php - -require("Flutterwave-Rave-PHP-SDK/library/Transfer.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Transfer; - -// sample payload for payBill() -$data = array( - "account_bank"=> "044", - "account_number"=> "0690000040", - "amount"=> 5500, - "narration"=> "Akhlm Pstmn Trnsfr xx007", - "currency"=> "NGN", - "reference"=> "akhlm-pstmnpyt-rfxx007_PMCKDU_1",// read the docs about testing successful and failed transaction. - "callback_url"=> "https://webhook.site/b3e505b0-fe02-430e-a538-22bbbce8ce0d", - "debit_currency"=> "NGN" -); - -//sample payload for bulkBill() -$bulkdata = array( - "title"=> "Staff salary", - "bulk_data"=> array( - array( - "bank_code"=> "044", - "account_number"=> "0690000032", - "amount"=> 45000, - "currency"=> "NGN", - "narration"=> "akhlm blktrnsfr", - "reference"=> "akhlm-blktrnsfr-xx03" - ), - array( - "bank_code"=> "044", - "account_number"=> "0690000034", - "amount"=> 5000, - "currency"=> "NGN", - "narration"=> "akhlm blktrnsfr", - "reference"=> "akhlm-blktrnsfr-xy03" - )) -); - -$getdata = array( - //"reference"=>"edf-12de5223d2f32434753432" - "id"=>"BIL136", - "product_id"=>"OT150" -); - -$listdata = array( - 'status'=>'failed' -); - -$feedata = array( -'currency'=> 'NGN', //if currency is omitted. the default currency of NGN would be used. -'amount'=> 1000 -); - -$payment = new Transfer(); -$result = $payment->singleTransfer($data);//initiate single transfer payment -$createBulkTransfer = $payment->bulkTransfer($bulkdata);// get bulk result.... -$transfers = $payment->listTransfers($listdata);//you can add a payload for the page. you can remove the array if want to get it all. -$getTransferFee = $payment->getTransferFee($feedata); -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); -} - +$data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => "TEST-".uniqid().time()."_PMCKDU_1", + "redirectUrl" => "https://www.example.com", + "additionalData" => [ + "account_details" => [ + "account_bank" => "044", + "account_number" => "0690000032", + "amount" => "2000", + "callback" => null + ], + "narration" => "Good Times in the making", + ], +]; + +$service = new Transfer(); +$customerObj = $service->customer->create([ + "full_name" => "Olaobaju Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" +]); +$data['customer'] = $customerObj; +$payload = $service->payload->create($data); +$response = $service->initiate($payload); ```
-### Vitual Cards +### Virtual Card The following implementation shows how to create virtual cards on rave. Use the Playground Directory to view Responses and samples of use. ```php -require("Flutterwave-Rave-PHP-SDK/library/VirtualCards.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\VirtualCard; - -$data = array( - "currency"=>"NGN", - "amount"=>20000, - "billing_name"=>"Jermaine Graham", - "billing_address"=>"2014 Forest Hills Drive", - "billing_city"=>"Node", - "billing_state"=>"Javascript", - "billing_postal_code"=>"000009", - "billing_country"=>"NG", - "callback_url"=>"https://webhook.site/96374895-154d-4aa0-99b5-709a0a128674" - ); - - $trns_data = array('id'=> 'a41de883-c8da-45a0-9b23-37780c88285f'); - $getCardData = array('id'=>'7a81d279-a07a-4775-a55a-5fa2c98e20ae'); - $terminate_data = array('id'=>'1cb36826-8e05-40d6-8b9e-7f7439a141cb'); - $fund_data = array('id'=>'1cb36826-8e05-40d6-8b9e-7f7439a141cb', 'amount'=>'2000', 'debit_currency'=>'NGN'); - $withdraw_data = array('id'=>'1cb36826-8e05-40d6-8b9e-7f7439a141cb', 'amount'=>'500'); - $blockCard_data = array('id' => '1cb36826-8e05-40d6-8b9e-7f7439a141cb', 'status_action'=>'block'); - - $card = new VirtualCard(); - $createCard = $card->createCard($data);//initiates the charge - $getCard = $card->getCard($getCardData); - $getCards = $card->listCards(); - $terminate = $card->terminateCard($terminate_data); - $fund = $card->fundCard($fund_data); - $transactions = $card->cardTransactions($trns_data); - $withdraw = $card->cardWithdrawal($withdraw_data); - $block_unblock = $card->block_unblock_card($blockCard_data); - print_r($createCard); +use Flutterwave\Payload; +use Flutterwave\Service\VirtualCard; +use Flutterwave\Util\Currency; + +$payload = new Payload(); +$service = new VirtualCard(); + +$payload->set("currency", Currency::NGN); +$payload->set("amount", "5000"); +$payload->set("debit_currency", Currency::NGN); +$payload->set("business_mobile", "+234505394568"); +$payload->set("billing_name", "Abraham Smith"); +$payload->set("firstname", "Abraham"); +$response = $service->create($payload); ``` ### BVN Verification @@ -644,13 +558,10 @@ $data = array( The following implementation shows how to verify a Bank Verification Number. ```php -require("Flutterwave-Rave-PHP-SDK/library/Bvn.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Bvn; -//The data variable holds the payload -$bvn_number = "123456789"; -$bvn = new Bvn(); -$result = $bvn->verifyBVN($bvn_number); -print_r($result); +use Flutterwave\Service\Misc; + +$service = new Misc(); +$response = $service->resolveBvn("203004042344532"); ```
@@ -660,96 +571,77 @@ print_r($result); The following implementation shows how to create a payment plan on the rave dashboard. Use the Playground Directory to view Responses and samples of use. ```php -require("Flutterwave-Rave-PHP-SDK/library/PaymentPlan.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\PaymentPlan; - -//sample payload for payBill() -$data = array( - "amount"=> 2000, - "name"=> "plan 2", - "interval"=> "monthly", - "duration"=> 48 -); -$update = array( "id" => "5356","name" => "The Game","status" => "Active"); -$getdata = array("id"=>"5116"); - -$payment = new PaymentPlan(); -$result = $payment->createPlan($data);//create a Plan reciept -$updateResult = $payment->updatePlan($update);//update a plan.... -$paymentPlans = $payment->getPlans();//list all payment plans.... -$aPlan = $payment->get_a_plan($getdata);//get a payment plans.... -print_r($result); +use Flutterwave\Payload; +use Flutterwave\Service\PaymentPlan; + +$payload = new Payload(); +$payload->set("amount", "2000"); +$payload->set("name", "Hulu Extra"); +$payload->set("interval", "monthly"); +$payload->set("duration", "1"); + +$service = new PaymentPlan($config); +$request = $service->create($payload); ```
-### Subaccount Management +### Collection Subaccount + +The following implementation shows how to create a subaccount via PHP SDK. -The following implementation shows how to create a subaccount on the rave dashboard -Use the Playground Directory to view Responses and samples of use. +```php +use Flutterwave\Payload; +use Flutterwave\Service\CollectionSubaccount; + +$payload = new Payload(); +$payload->set("account_bank", "044"); +$payload->set("account_number", "06900000".mt_rand(29, 40)); +$payload->set("business_name", "Maxi Ventures"); +$payload->set("split_value", "0.5"); // 50% +$payload->set("business_mobile", "09087930450"); +$payload->set("business_email", "vicomma@gmail.com"); +$payload->set("country", "NG"); +$service = new CollectionSubaccount($config); +$request = $service->create($payload); +``` + +### Payout Subaccount + +The following implementation shows how to create a payout subaccount via PHP SDK. ```php -require("Flutterwave-Rave-PHP-SDK/library/Subaccount.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Subaccount; - -$data = array( - "account_bank"=> "044", - "account_number"=> "0690000037", - "business_name"=> "Eternal Blue", - "business_email"=> "petya@stux.net", - "business_contact"=> "Anonymous", - "business_contact_mobile"=> "090890382", - "business_mobile"=> "09087930450", - "country"=> "NG", - "meta"=> array( - array( - "meta_name"=> "mem_adr", - "meta_value"=> "0x16241F327213" - ) - ), - "split_type"=> "percentage", - "split_value"=> 0.5 -); - -$fetch_data = array("id" => "RS_9247C52A37C5EB15C7E8E974CD1B35D7"); -$update_data = array("id" => "2755","business_name"=>"Mad O!","business_email"=> "mad@o.enterprises", -"account_bank"=> "044","account_number"=> "0690000040","split_type"=> "flat","split_value"=> "200"); - -$subaccount = new Subaccount(); -$createSubaccount = $subaccount->createSubaccount($data); -$getSubaccounts = $subaccount->getSubaccounts(); -$fetchSubaccount = $subaccount->fetchSubaccount($fetch_data); -$updateSubaccount = $subaccount->updateSubaccount($update_data); -print_r($createSubaccount); +use Flutterwave\Payload; +use Flutterwave\Customer; +use Flutterwave\Service\PayoutSubaccount; + +$customer = new Customer(); +$customer->set("fullname","Jake Teddy"); +$customer->set("email","jteddy@gmail.com"); +$customer->set("phone_number","+2348065007000"); +$payload = new Payload(); +$payload->set("country", "NG"); +$payload->set("customer", $customer); +$service = new PayoutSubaccount($config); +$request = $service->create($payload); ```
-### Transfer Recipient +### Beneficiaries -The following implementation shows how to create a transfer recipient on the rave dashboard. Use the Playground Directory to view Responses and samples of use. +The following implementation shows how to create a transfer Beneficiary via the PHP SDK. ```php -require("Flutterwave-Rave-PHP-SDK/library/Recipient.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Recipient; - -$data = array( - "account_bank"=> "044", - "account_number"=> "0690000036", -); -$fetchdata = array( - 'id' => '6153' -); -$deldata = array( - 'id'=>'7236' -); - -$payment = new Recipient(); -$recipient1 = $payment->createRecipient($data);//Create a recipient for transfer -$recipients = $payment->listRecipients();// get all existing recipients -$recipient = $payment->fetchBeneficiary($fetchdata);//fetch a specific recipient. -$deleteRecipient = $payment->deleteBeneficiary($deldata);//delete recipient -print_r($recipient1); +use Flutterwave\Payload; +use Flutterwave\Service\Beneficiaries; + +$payload = new Payload(); +$payload->set("account_bank", "044"); +$payload->set("account_number", "0690000034"); +$payload->set("beneficiary_name", "Abraham Smith Olaolu"); +$service = new Beneficiaries($config); +$request = $service->create($payload); ```
@@ -759,18 +651,15 @@ print_r($recipient1); The following implementation shows how to activate a subscription, fetch a subscription, get all subscriptions. ```php -require("Flutterwave-Rave-PHP-SDK/library/Subscription.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Subscription; - -$id = 1112 //Id of subscription plan -//$cid = 2222 -$subscription = new Subscription(); -$resultGet = $subscription->getAllSubscription();//gets all existing subscription -$resultActivate = $subscription->activateSubscription($id);// activates a subscription plan -$resultCancel = $subscription->cancelSubscription($cid);// activates a subscription plan - -//returns the result -print_r($result); +use Flutterwave\Service\Subscription; + +# List Subscription +$service = new Subscription(); +$response = $service->list(); + +# Activate Subscription +$service = new Subscription(); +$response = $service->activate("4147"); ``` ### Bills @@ -780,88 +669,18 @@ The following implementation shows how to pay for any kind of bill from Airtime visit: https://developer.flutterwave.com/v3.0/reference#buy-airtime-bill ```php -require("Flutterwave-Rave-PHP-SDK/library/Bill.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Bill; - -$data = array( - "country"=> "NG", - "customer"=> "+23490803840303", - "amount"=> 500, - "recurrence"=> "ONCE", - "type"=> "AIRTIME", - "reference"=> "9300049645534545454332433" -); - -//sample payload for bulkBill() -$bulkdata = array( - "bulk_reference"=>"edf-12de5223d2f3243474543", - "callback_url"=>"https://webhook.site/96374895-154d-4aa0-99b5-709a0a128674", - "bulk_data"=> array( - array( - "country"=> "NG", - "customer"=> "+23490803840303", - "amount"=> 500, - "recurrence"=> "WEEKLY", - "type"=> "AIRTIME", - "reference"=>"930049200929" - ), - array( - "country"=>"NG", - "customer"=> "+23490803840304", - "amount"=> 500, - "recurrence"=> "WEEKLY", - "type"=>"AIRTIME", - "reference"=>"930004912332434232" - ) - ), -); - -$getdata = array( - //"reference"=>"edf-12de5223d2f32434753432" - "id"=>"BIL136", - "product_id"=>"OT150" -); - -$payment = new Bill(); -$result = $payment->payBill($data);//create a bill paymenr -$bulkresult = $payment->bulkBill($bulkdata);//create bulk bill payment.... -$getresult = $payment->getBill($getdata);// get bulk result.... -$getAgencies = $payment->getAgencies(); -$getBillCategories = $payment->getBillCategories(); -print_r($result); -``` - -### Ebills - -The following implementation shows how to create a electronic receipt. - -```php -require("Flutterwave-Rave-PHP-SDK/library/Ebill.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Ebill; - -$data = array( - "narration"=> "mndkn blls", - "number_of_units"=> 2,//should be a string - "currency"=> "NGN", - "amount"=> 200,//should be a string - "phone_number"=> "09384747474", - "email"=>"jake@rad.com", - "tx_ref"=> "akhlm-pstmn-1094434370393", - "ip"=> "127.9.0.7", - "custom_business_name"=> "John Madakin", - "country"=> "NG" -); - -$update = array( - "reference"=>"RVEBLS-2B93A7039017-90937",//on creation of order, this is the flw_ref - "currency"=> "NGN", - "amount"=> "4000" -); - -$payment = new Ebill(); -$result = $payment->order($data);//create an order reciept -$updateResult = $payment->updateOrder($update);//create bulk bill payment.... -print_r($result); +use Flutterwave\Payload; +use Flutterwave\Service\Bill; + +$payload = new Payload(); +$payload->set("country", "NG"); +$payload->set("customer", "+2349067985861"); +$payload->set("amount", "2000"); +$payload->set("type", "AIRTIME"); +$payload->set("reference", "TEST_".uniqid().uniqid()); + +$service = new Bill($config); +$request = $service->createPayment($payload); ``` ### Virtual Accounts @@ -870,38 +689,16 @@ The following implementation shows how to create a virtual Account. Please view https://developer.flutterwave.com/reference#create-a-virtual-account-number ```php -require("Flutterwave-Rave-PHP-SDK/library/VirtualAccount.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\VirtualAccount; - -//sample payload for payBill() -$data = array( - "email"=> "johnmadakin@allstar.com", - "duration"=> 5, - "frequency"=> 5, - "amount"=>"22000", - "is_permanent"=> true, - "tx_ref"=> "jhn-mdkn-101923123463" -); - -$bulkdata = array( - "accounts"=> 5, - "email"=> "sam@son.com", - "is_permanent"=> true, - "tx_ref"=> "jhn-mndkn-012439283422" -); - -$batch = array('batch_id' => 'RND_2641579516055928'); - -$getdata = array( - "order_ref"=>"URF_1590362018488_8875935" -); - -$account = new VirtualAccount(); -$result = $account->createVirtualAccount($data);//create a virtak account -$bulkAccounts = $account->createBulkAccounts($bulkdata);//create bulk v accounts -$virtualAccounts = $account->getBulkAccounts($batch);//list all bulk accounts -$virtualAccount = $account->getAccountNumber($getdata);//get an account. -print_r($result); +use Flutterwave\Service\VirtualAccount; + +$service = new VirtualAccount(); + +$payload = [ + "email" => "kennyio@gmail.com", + "bvn" => "12345678901", +]; + +$response = $service->create($payload); ```
@@ -910,94 +707,39 @@ print_r($result); Once the charge and validation process is complete for the first charge on the card, you can make use of the token for subsequent charges. ```php -require("Flutterwave-Rave-PHP-SDK/library/TokenizedCharge.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\TokenizedCharge; - -$data = array( - "token"=> "flw-t1nf-1ff187b04cecb4acff4ac62c2b6f7784-m03k", - "currency"=> "NGN", - "country"=> "NG", - "amount"=> 30300, - "email"=> "olaobajua@gmail.com", - "first_name"=> "Anonymous", - "last_name"=> "customer", - "client_ip" =>"154.123.220.1", - "device_fingerprint" =>"62wd23423rq324323qew1" - ); - -$payment = new TokinizedCharge(); -$result = $payment->tokenCharge($data);//initiates the charge -$verify = $payment->verifyTransaction(); -print_r($result); +use Flutterwave\Util\Currency; + +$data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "token" => "flw-t0-fe20067f9d8d3ce3d06f93ea2d2fea28-m03k" + ] +]; + +$data['redirectUrl'] = "http://{$_SERVER['HTTP_HOST']}/examples/endpoint/verify.php?tx_ref={$data['tx_ref']}"; + +$customerObj = $tokenpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" +]); +$data['customer'] = $customerObj; +$tokenpayment = \Flutterwave\Flutterwave::create("tokenize"); +$payload = $tokenpayment->payload->create($data); +$result = $tokenpayment->initiate($payload); ``` -
### View Transactions List all transactions on your account. You could do a specific query using ```customer_email``` or ```customer_fullname``` to make specifc search. View all successfull or failed transactions for a particular period, month or year ```php -require("Flutterwave-Rave-PHP-SDK/library/Transactions.php"); -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\Transactions; - -$data = array( -'amount'=> 1000 -); -$fetch_data = array( -'id'=>'345522' -); -$time_data = array( - 'id'=>'3434' -); - -$history = new Transactions(); -$transactions = $history->viewTransactions(); -$transactionfee = $history->getTransactionFee($data); -$verifyTransaction = $history->verifyTransaction($fetch_data); -$timeline = $history->viewTimeline($time_data); -print_r($transactions); -``` -
- -### Voucher payment - -Collect ZAR payments offline using Vouchers - -```php -require("Flutterwave-Rave-PHP-SDK/library/VoucherPayment.php"); - -use Flutterwave\EventHandlers\EventHandlers\EventHandlers\EventHandlers\EventHandlers\VoucherPayment; -//The data variable holds the payload -$data = array( - //"public_key": "FLWPUBK-6c4e3dcb21282d44f907c9c9ca7609cb-X"//you can ommit the public key as the key is take from your .env file - //"tx_ref": "MC-15852309v5050e8", - "amount"=> "100", - "type"=> "voucher_payment", - "currency"=> "ZAR", - "pin"=> "19203804939000", - "email"=>"ekene@flw.com", - "phone_number" =>"0902620185", - "account_bank" => "058", - "fullname" => "Ekene Eze", - "client_ip" =>"154.123.220.1", - "device_fingerprint" =>"62wd23423rq324323qew1", - "meta" => array( - "flightID"=> "123949494DC" - ) - ); - -$payment = new VoucherPayment(); -$result = $payment->voucher($data); -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); -} -print_r($result); +# Transaction service ``` -You can also find the class documentation in the docs folder. There you will find documentation for the `Rave` class and the `EventHandlerInterface`. - - ## Testing All of the SDK's tests are written with PHP's ```phpunit``` module. The tests currently test: @@ -1005,7 +747,8 @@ All of the SDK's tests are written with PHP's ```phpunit``` module. The tests cu ```Card```, ```Transfer```, ```Preauth```, -```Subaccount```, +```Collection Subaccount```, +```Payout Subaccount```, ```Subscriptions``` and ```Paymentplan``` @@ -1042,6 +785,7 @@ You can also follow us [@FlutterwaveEng](https://twitter.com/FlutterwaveEng) and ## Contribution guidelines Read more about our community contribution guidelines [here](/CONTRIBUTING.md) + ## License @@ -1050,7 +794,6 @@ By contributing to this library, you agree that your contributions will be licen Copyright (c) Flutterwave Inc. - ## Flutterwave API References diff --git a/ajax-loader.gif b/assets/images/ajax-loader.gif similarity index 100% rename from ajax-loader.gif rename to assets/images/ajax-loader.gif diff --git a/assets/js/v3.js b/assets/js/v3.js new file mode 100644 index 0000000..e2e8901 --- /dev/null +++ b/assets/js/v3.js @@ -0,0 +1 @@ +"use strict";function _toArray(t){return _arrayWithHoles(t)||_iterableToArray(t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var t=this.length-1;t>=0;t--)this[t]&&this[t].parentElement&&this[t].parentElement.removeChild(this[t])},"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||!function(t){if("Element"in t){var e="classList",n="prototype",r=t.Element[n],o=Object,i=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},a=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},s=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return a.call(t,e)},u=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],r=0,o=n.length;o>r;r++)this.push(n[r]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=u[n]=[],d=function(){return new u(this)};if(s[n]=Error[n],l.item=function(t){return this[t]||null},l.contains=function(t){return~c(this,t+"")},l.add=function(){var t,e=arguments,n=0,r=e.length,o=!1;do t=e[n]+"",~c(this,t)||(this.push(t),o=!0);while(++ne;e++)t=arguments[e],r.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),r=n.indexOf(t+"");~r&&(n=n.slice(r),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)))}),t=null}()),!function(t,e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){function t(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})}function e(){}function n(t){if(!(this instanceof n))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],s(t,this)}function r(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,n._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(a){return void i(e.promise,a)}o(e.promise,r)}else(1===t._state?o:i)(e.promise,t._value)})):t._deferreds.push(e)}function o(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==_typeof(e)||"function"==typeof e)){var r=e.then;if(e instanceof n)return t._state=3,t._value=e,void a(t);if("function"==typeof r)return void s(function(t,e){return function(){t.apply(e,arguments)}}(r,e),t)}t._state=1,t._value=e,a(t)}catch(o){i(t,o)}}function i(t,e){t._state=2,t._value=e,a(t)}function a(t){2===t._state&&0===t._deferreds.length&&n._immediateFn(function(){t._handled||n._unhandledRejectionFn(t._value)});for(var e=0,o=t._deferreds.length;o>e;e++)r(t,t._deferreds[e]);t._deferreds=null}function s(t,e){var n=!1;try{t(function(t){n||(n=!0,o(e,t))},function(t){n||(n=!0,i(e,t))})}catch(r){if(n)return;n=!0,i(e,r)}}var c=setTimeout;n.prototype["catch"]=function(t){return this.then(null,t)},n.prototype.then=function(t,n){var o=new this.constructor(e);return r(this,new function(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}(t,n,o)),o},n.prototype["finally"]=t,n.all=function(t){return new n(function(e,n){function r(t,a){try{if(a&&("object"==_typeof(a)||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(t,e)},n)}o[t]=a,0==--i&&e(o)}catch(c){n(c)}}if(!t||"undefined"==typeof t.length)throw new TypeError("Promise.all accepts an array");var o=Array.prototype.slice.call(t);if(0===o.length)return e([]);for(var i=o.length,a=0;o.length>a;a++)r(a,o[a])})},n.resolve=function(t){return t&&"object"==_typeof(t)&&t.constructor===n?t:new n(function(e){e(t)})},n.reject=function(t){return new n(function(e,n){n(t)})},n.race=function(t){return new n(function(e,n){for(var r=0,o=t.length;o>r;r++)t[r].then(e,n)})},n._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){c(t,0)},n._unhandledRejectionFn=function(t){void 0!==console&&console&&void 0};var u=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in u?u.Promise.prototype["finally"]||(u.Promise.prototype["finally"]=t):u.Promise=n}),!function(t){function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!=typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return p.iterable&&(e[Symbol.iterator]=function(){return e}),e}function o(t){this.map={},t instanceof o?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function i(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function a(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function s(t){var e=new FileReader,n=a(e);return e.readAsArrayBuffer(t),n}function c(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(p.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(p.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(p.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(p.arrayBuffer&&p.blob&&m(t))this._bodyArrayBuffer=c(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!p.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!y(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=c(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):p.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},p.blob&&(this.blob=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t,e,n,r=i(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=a(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function f(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new o(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var p={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(p.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=function(t){return t&&DataView.prototype.isPrototypeOf(t)},y=ArrayBuffer.isView||function(t){return t&&h.indexOf(Object.prototype.toString.call(t))>-1};o.prototype.append=function(t,r){t=e(t),r=n(r);var o=this.map[t];this.map[t]=o?o+","+r:r},o.prototype["delete"]=function(t){delete this.map[e(t)]},o.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},o.prototype.set=function(t,r){this.map[e(t)]=n(r)},o.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},o.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},o.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},o.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},p.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this,{body:this._bodyInit})},u.call(l.prototype),u.call(f.prototype),f.prototype.clone=function(){return new f(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},f.error=function(){var t=new f(null,{status:0,statusText:""});return t.type="error",t};var _=[301,302,303,307,308];f.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new f(null,{status:e,headers:{location:t}})},t.Headers=o,t.Request=l,t.Response=f,t.fetch=function(t,e){return new Promise(function(n,r){var i=new l(t,e),a=new XMLHttpRequest;a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new o,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}}),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new f(i,r))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&p.blob&&(a.responseType="blob"),i.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:void 0),!function(t,e){"function"==typeof define&&define.amd?define([],function(){e(t)}):e(t)}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0,function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;t.__Base64__=Object.freeze(Object.create(null,{encode:{value:function(t){return function(t){for(var n,r,o,i,a="",s=0,c=(t=String(t)).length%3;s255||(o=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");a+=e.charAt((n=r<<16|o<<8|i)>>18&63)+e.charAt(n>>12&63)+e.charAt(n>>6&63)+e.charAt(63&n)}return c?a.slice(0,c-3)+"===".substring(c):a}(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode("0x"+e)}))}},decode:{value:function(t){return decodeURIComponent(escape(function(t){if(t=String(t).replace(/[\t\n\f\r ]+/g,""),!n.test(t))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");t+="==".slice(2-(3&t.length));for(var r,o,i,a="",s=0;s>16&255):64===i?String.fromCharCode(r>>16&255,r>>8&255):String.fromCharCode(r>>16&255,r>>8&255,255&r);return a}(t)))}}}))}),function(t){function e(t){return new Promise(function(e){var n;try{if(t.PBFPubKey)return L=n=t.PBFPubKey,void(n in U&&null!==U[n]?e(U[n]):U[n]=fetch(N+"/v2/checkout/upgrade",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({public_key:n})}).then(function(t){return t.json()}).then(function(t){U[n]=[!!t.data.upgrade];try{U[n].push(new URL(t.data.custom).origin)}catch(e){}return U[n]})["catch"](function(){return U[n]=null}).then(e))}catch(r){}e()})}function n(){var t=[].concat(U[L]);return t[1]||(t[0]===!0?z:D)}function r(t,e){try{M.removeEventListener("message",F[L]),F[L]=null}catch(n){}I=!1,t===!1&&y&&y.onclose&&y.onclose(e===!0),P(),a()}function o(t,e){H=setTimeout(function(){r();try{t()}catch(e){}},e)}function i(t){var e=[];for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r=encodeURIComponent(r),e.push(n+"="+r)}return"__="+__Base64__.encode(e.join("&"))}function a(){if(k){var t=document.getElementById("rve_spinner_container_0999");t&&document.body.removeChild(t)}}function s(t,e){k=function(){var t=document.createElement("div"),e=document.createElement("div");t.setAttribute("class","spinner-container"),t.setAttribute("id","rve_spinner_container_0999"),e.setAttribute("class","spinner");var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("width","40px"),n.setAttribute("height","40px"),n.setAttribute("viewBox","0 0 60 60");var r=document.createElementNS("http://www.w3.org/2000/svg","path");r.style.fill="#f5a623",r.style.fillRule="evenodd",r.setAttribute("d","M59.972 26a37.616 37.616 0 0 0-.71-3.455 30.092 30.092 0 0 0-1.446-4.26 30.682 30.682 0 0 0-4.809-7.849 29.483 29.483 0 0 0-7.594-6.389A29.733 29.733 0 0 0 36.292.551C34.63.216 32.956.015 31.255.002a39.08 39.08 0 0 0-3.964.16 30.369 30.369 0 0 0-9.898 2.747 30.882 30.882 0 0 0-7.34 4.848A30.286 30.286 0 0 0 4.4 14.495C2.7 17.28 1.427 20.32.73 23.509c-.562 2.545-.83 5.17-.696 7.782.12 2.532.509 5.063 1.272 7.488a30.823 30.823 0 0 0 1.782 4.5 30.367 30.367 0 0 0 2.464 4.112 30.149 30.149 0 0 0 6.67 6.764 29.967 29.967 0 0 0 18.779 5.827 29.845 29.845 0 0 0 9.724-1.942 29.06 29.06 0 0 0 8.237-4.862c1.232-1.045 2.33-2.224 3.362-3.47 1.045-1.259 1.982-2.585 2.76-4.018a29.445 29.445 0 0 0 1.714-3.817c.24-.643.469-1.286.656-1.956.2-.71.348-1.446.482-2.17.201-1.138.281-2.317.174-3.469-.093.51-.174 1.005-.294 1.5a14.602 14.602 0 0 1-.55 1.688c-.428 1.165-.964 2.29-1.473 3.416a36.09 36.09 0 0 1-2.25 4.125 28.98 28.98 0 0 1-1.353 1.996c-.482.643-1.031 1.259-1.58 1.862a23.257 23.257 0 0 1-3.617 3.268 26.913 26.913 0 0 1-4.3 2.585c-3.026 1.473-6.335 2.357-9.683 2.652a27.72 27.72 0 0 1-10.22-1.018 27.424 27.424 0 0 1-8.72-4.393 27.441 27.441 0 0 1-6.455-6.939c-1.808-2.719-3.054-5.786-3.737-8.987a26.897 26.897 0 0 1-.402-2.532c-.08-.723-.147-1.46-.174-2.196a26.23 26.23 0 0 1 .281-4.581c.496-3.295 1.568-6.47 3.228-9.363a26.813 26.813 0 0 1 5.64-6.885 26.563 26.563 0 0 1 7.607-4.701 25.887 25.887 0 0 1 5.01-1.46 24.97 24.97 0 0 1 2.611-.362c.429-.04.844-.04 1.273-.08.174 0 .348.013.522.013 2.906-.053 5.826.322 8.599 1.192a25.15 25.15 0 0 1 8.237 4.42 25.798 25.798 0 0 1 6.295 7.475 27.988 27.988 0 0 1 2.934 7.795c.134.63.24 1.26.348 1.889a2.11 2.11 0 0 0 .91 1.433c1.045.696 2.505.228 3.014-.897.174-.389.228-.804.161-1.193z"),n.appendChild(r),n.classList.add("svg-spinner"),e.appendChild(n),t.appendChild(e),document.body.appendChild(t);var o=document.createElement("style");o&&(o.appendChild(document.createTextNode(".spinner-container{height:100%;width:100%;position:fixed;top:0;left:0;background-color:rgba(225,225,225,.95); z-index:9999999}.svg-spinner{-webkit-animation:spin 500ms infinite linear;animation:spin 500ms infinite linear}.spinner{margin-top:-20px; margin-left:-20px; position:fixed; top:50%; left:50%;}@-webkit-keyframes spin {from { -webkit-transform: rotate(0deg);}to { -webkit-transform: rotate(360deg); }}@keyframes spin{from {transform:rotate(0deg);}to {transform:rotate(360deg);}}")),document.getElementsByTagName("head")[0].appendChild(o))},B=document.createElement("iframe"),B.setAttribute("style","position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;"),B.setAttribute("allowTransparency","true"),B.setAttribute("width","100%"),B.setAttribute("height","100%"),B.setAttribute("name","checkout"),e?(O="loading",B.style.opacity="0",B.style.pointerEvents="none",B.style.zIndex="-1",J=function(){S=!0,document.body.style.overflow="hidden",B.style.opacity="1",B.style.pointerEvents="",B.style.zIndex="2147483647"},P=function(){S=!1,B.style.opacity="0",B.style.pointerEvents="none",B.style.zIndex="-1",document.body.style.overflow="",f()}):(document.body.style.overflow="",B.style.opacity="1",B.style.pointerEvents="",B.style.zIndex="2147483647"),B.setAttribute("id","flwpugpaidid"),B.src=n()+"/?",document.body&&(document.querySelector("#flwpugpaidid")&&document.querySelector("#flwpugpaidid").remove(),document.body.appendChild(B))}function c(t,e){var n={};return e.forEach(function(e){var r=t.getAttribute("data-"+e);r&&(n[e]=r)}),n}function u(t){for(var e=t.attributes,n=e.length,r=[],o=0;o0?";".concat(i.join("&")):"")}return e},t.addEventListener("beforeunload",function(){T&&clearTimeout(T)}),t.FlutterwaveCheckout=function(t){t=t&&"object"===_typeof(t)&&"error"===String(t.status).toLowerCase()?t:p(t);var n=e(t),r=!1;return n.then(function(){t.PBFPubKey===L&&r!==!0&&(F[L]=function(t){var e=t&&t.data&&t.data.name;e&&q[e]&&(r===!0?A(!0,!1):q[e](t))},M.addEventListener("message",F[L]),m(t))}),{close:function(){try{t.PBFPubKey===L&&(r=!0,A(!0,!1))}catch(e){}}.bind(null)}}}(window); \ No newline at end of file diff --git a/composer.json b/composer.json index a8a6c6a..d289016 100644 --- a/composer.json +++ b/composer.json @@ -1,23 +1,32 @@ { "name": "flutterwavedev/flutterwave-v3", - "description": "A simple SDK for integrating to Flutterwave's Rave payment", + "description": "A simple SDK for integrating to Flutterwave Payment", "type": "library", - "keywords": ["rave", "flutterwave", "payment", "transfers", "africa"], + "keywords": ["flutterwave", "payment", "transfers", "africa"], "homepage": "https://github.com/Flutterwave/Flutterwave-PHP-v3", "autoload": { "psr-4": { - "Flutterwave\\": "library/" + "Flutterwave\\": "src/" } }, + "autoload-dev": { + "Flutterwave\\Test\\": "tests/" + }, "require": { - "php": ">=5.4.0", - "monolog/monolog": ">=2.0", - "mashape/unirest-php": ">=3.0", - "vlucas/phpdotenv": ">=2.5" + "php": "^7.4 || ^8.0 || ^8.1", + "monolog/monolog": "^2.0 || ^3.0", + "vlucas/phpdotenv": "^2.5 || ^3.0 || ^5.0", + "ext-json": "*", + "guzzlehttp/guzzle": "^7.5", + "psr/http-client": "^1.0" }, "require-dev": { "phpunit/phpunit": ">=6.0", - "mockery/mockery": ">=1.2" + "mockery/mockery": ">=1.2", + "symfony/var-dumper": "5.4.13", + "phpstan/phpstan": "^1.9", + "pestphp/pest": "^1.22", + "nunomaduro/phpinsights": "^2.6" }, "license": "MIT", "authors": [ @@ -25,5 +34,11 @@ "name": "Flutterwave Developers", "email": "developers@flutterwavego.com" } - ] + ], + "config": { + "allow-plugins": { + "pestphp/pest-plugin": true, + "dealerdirect/phpcodesniffer-composer-installer": true + } + } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 9a77eff..0000000 --- a/composer.lock +++ /dev/null @@ -1,2826 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "fbbbed3fdb765f0e67e3123dbe8c80fb", - "packages": [ - { - "name": "graham-campbell/result-type", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "0690bde05318336c7221785f2a932467f98b64ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/0690bde05318336c7221785f2a932467f98b64ca", - "reference": "0690bde05318336c7221785f2a932467f98b64ca", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "phpoption/phpoption": "^1.8" - }, - "require-dev": { - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "GrahamCampbell\\ResultType\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "An Implementation Of The Result Type", - "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Result Type", - "Result-Type", - "result" - ], - "support": { - "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.4" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", - "type": "tidelift" - } - ], - "time": "2021-11-21T21:41:47+00:00" - }, - { - "name": "mashape/unirest-php", - "version": "v3.0.4", - "source": { - "type": "git", - "url": "https://github.com/Mashape/unirest-php.git", - "reference": "842c0f242dfaaf85f16b72e217bf7f7c19ab12cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Mashape/unirest-php/zipball/842c0f242dfaaf85f16b72e217bf7f7c19ab12cb", - "reference": "842c0f242dfaaf85f16b72e217bf7f7c19ab12cb", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "codeclimate/php-test-reporter": "0.1.*", - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-json": "Allows using JSON Bodies for sending and parsing requests" - }, - "type": "library", - "autoload": { - "psr-0": { - "Unirest\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Unirest PHP", - "homepage": "https://github.com/Mashape/unirest-php", - "keywords": [ - "client", - "curl", - "http", - "https", - "rest" - ], - "support": { - "email": "opensource@mashape.com", - "issues": "https://github.com/Mashape/unirest-php/issues", - "source": "https://github.com/Mashape/unirest-php/tree/master" - }, - "time": "2016-08-11T17:49:21+00:00" - }, - { - "name": "monolog/monolog", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", - "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2", - "guzzlehttp/guzzle": "^7.4", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1", - "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.7.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2022-06-09T08:59:12+00:00" - }, - { - "name": "phpoption/phpoption", - "version": "1.8.1", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" - }, - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2021-12-04T23:24:31+00:00" - }, - { - "name": "psr/log", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" - }, - "time": "2021-07-14T16:46:02+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-10T07:21:04+00:00" - }, - { - "name": "vlucas/phpdotenv", - "version": "v5.4.1", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/264dce589e7ce37a7ba99cb901eed8249fbec92f", - "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" - }, - "suggest": { - "ext-filter": "Required to use the boolean validator." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://github.com/vlucas" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.4.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], - "time": "2021-12-12T23:22:04+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0|^8.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "support": { - "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" - }, - "time": "2020-07-09T08:09:16+00:00" - }, - { - "name": "mockery/mockery", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "^2.0.1", - "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" - }, - "conflict": { - "phpunit/phpunit": "<8.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "support": { - "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.0" - }, - "time": "2022-01-20T13:18:17+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.14.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" - }, - "time": "2022-05-31T20:59:12+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.15", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-07T09:28:20+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.21", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-06-19T12:14:25+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-11-11T14:18:36+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-15T09:54:48+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.4.0" - }, - "platform-dev": [], - "plugin-api-version": "2.3.0" -} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..869968b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + web: + image: nginx + ports: + - "80:80" + volumes: + - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf + depends_on: + - app + db: + image: mysql:5.7 + volumes: + - ./docker/mysql:/var/lib/mysql \ No newline at end of file diff --git a/docs/classes/Flutterwave.Rave.EventHandlerInterface.html b/docs/classes/Flutterwave.Rave.EventHandlerInterface.html deleted file mode 100644 index 6e2ccdf..0000000 --- a/docs/classes/Flutterwave.Rave.EventHandlerInterface.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - API Documentation » \Flutterwave\Rave\EventHandlerInterface - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
-
-

EventHandlerInterface

- - Extends - -

Implement this interface to set triggers for transaction event on Rave.

-
-
-

An event can be triggered when a Rave initializes a transaction, When a -transaction is successful, failed, requeried and when a requery fails.

-
- - - - - - - - - - - - - -
- author - - -

Olufemi Olanipekun iolufemi@ymail.com

-
- version - - 1.0 - -
- package - - -

Default

-
- -

Methods

- -
-

This is called when a transaction is canceled by the user

-
onCancel(string $transactionReference) 
-
-
- - -
-
-
- - - - - - -
- - -
- -

Arguments

-
-

$transactionReference

- string

This is the transaction reference as returned from the Rave payment gateway

-
- -
-
- -
- -
-

This is called only when a transaction failed

-
onFailure(object $transactionData) 
-
-
- - -
-
-
- - - - - - -
- - -
- -

Arguments

-
-

$transactionData

- object

This is the transaction data as returned from the Rave payment gateway

-
- -
-
- -
- -
-

This is called when the a transaction is initialized

-
onInit(object $initializationData) 
-
-
- - -
-
-
- - - - - - -
- - -
- -

Arguments

-
-

$initializationData

- object

This is the initial transaction data as passed

-
- -
-
- -
- -
-

This is called when a transaction is requeryed from the payment gateway

-
onRequery(string $transactionReference) 
-
-
- - -
-
-
- - - - - - -
- - -
- -

Arguments

-
-

$transactionReference

- string

This is the transaction reference as returned from the Rave payment gateway

-
- -
-
- -
- -
-

This is called a transaction requery returns with an error

-
onRequeryError(string $requeryResponse) 
-
-
- - -
-
-
- - - - - - -
- - -
- -

Arguments

-
-

$requeryResponse

- string

This is the error response gotten from the Rave payment gateway requery call

-
- -
-
- -
- -
-

This is called only when a transaction is successful

-
onSuccessful(object $transactionData) 
-
-
- - -
-
-
- - - - - - -
- - -
- -

Arguments

-
-

$transactionData

- object

This is the transaction data as returned from the Rave payment gateway

-
- -
-
- -
- -
-

This is called when a transaction doesn't return with a success or a failure response.

-
onTimeout(string $transactionReference,  $data) 
-
-
- - -
-
-
- - - - - - - - - - -
- data - - -

object $data This is the data returned from the requery call.

-
- - -
- -

Arguments

-
-

$transactionReference

- string

This is the transaction reference as returned from the Rave payment gateway

-
-
-

$data

-

-
- -
-
- -
- - -
-
- - -
-
- -
- - - - diff --git a/docs/classes/Flutterwave.Rave.html b/docs/classes/Flutterwave.Rave.html deleted file mode 100644 index 342d711..0000000 --- a/docs/classes/Flutterwave.Rave.html +++ /dev/null @@ -1,2149 +0,0 @@ - - - - - - API Documentation » \Flutterwave\Rave - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
-
-
- - -
-
- - - - -
- - - - -
- -
-
-

Rave

- - -

Flutterwave's Rave payment gateway PHP SDK

-
-
- -
- - - - - - - - - - - - - -
- author - - -

Olufemi Olanipekun iolufemi@ymail.com

-
- version - - 1.0 - -
- package - - -

Default

-
- -

Methods

- -
-

Construct

-
__construct(string $publicKey, string $secretKey, string $prefix, string $env = 'staging', boolean $overrideRefWithPrefix = false) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$publicKey

- string

Your Rave publicKey. Sign up on https://rave.flutterwave.com to get one from your settings page

-
-
-

$secretKey

- string

Your Rave secretKey. Sign up on https://rave.flutterwave.com to get one from your settings page

-
-
-

$prefix

- string

This is added to the front of your transaction reference numbers

-
-
-

$env

- string

This can either be 'staging' or 'live'

-
-
-

$overrideRefWithPrefix

- boolean

Set this parameter to true to use your prefix as the transaction reference

-
- -

Response

- object

-
-
- -
- -
-

Generates a checksum value for the information to be sent to the payment gateway

-
createCheckSum() : object
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- object

-
-
- -
- -
-

Generates a transaction reference number for the transactions

-
createReferenceNumber() : object
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- object

-
-
- -
- -
-

Sets the event hooks for all available triggers

-
eventHandler(object $handler) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$handler

- object

This is a class that implements the Event Handler Interface

-
- -

Response

- object

-
-
- -
- -
-

gets the transaction amount

-
getAmount() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the transaction country

-
getCountry() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the transaction currency

-
getCurrency() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the transaction description

-
getDescription() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the customer email

-
getEmail() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the customer firstname

-
getFirstname() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the customer lastname

-
getLastname() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- - - - - -
-

gets payment page button text

-
getPayButtonText() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the allowed payment methods

-
getPaymentMethod() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the customer phonenumber

-
getPhoneNumber() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the transaction redirect url

-
getRedirectUrl() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the current transaction reference number for the transaction

-
getReferenceNumber() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

gets the payment page title

-
getTitle() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

Generates the final json to be used in configuring the payment call to the rave payment gateway

-
initialize() : string
-
-
- - -
-
-
- - - - - - -
- - -
- - -

Response

- string

-
-
- -
- -
-

Handle canceled payments with this method

-
paymentCanceled(string $referenceNumber) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$referenceNumber

- string

This should be the reference number of the transaction that was canceled

-
- -

Response

- object

-
-
- -
- -
-

Requerys a previous transaction from the Rave payment gateway

-
requeryTransaction(string $referenceNumber) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$referenceNumber

- string

This should be the reference number of the transaction you want to requery

-
- -

Response

- object

-
-
- -
- -
-

Sets the transaction amount

-
setAmount(integer $amount) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$amount

- integer

Transaction amount

-
- -

Response

- object

-
-
- -
- -
-

Sets transaction country

-
setCountry(string $country) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$country

- string

The transaction country. Can be NG, US, KE, GH and ZA

-
- -

Response

- object

-
-
- -
- -
-

Sets the transaction currency

-
setCurrency(string $currency) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$currency

- string

The transaction currency. Can be NGN, GHS, KES, ZAR, USD, EUR and GBP

-
- -

Response

- object

-
-
- -
- -
-

Sets the transaction description

-
setDescription(string $customDescription) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$customDescription

- string

The description of the transaction

-
- -

Response

- object

-
-
- -
- -
-

Sets the customer email

-
setEmail(string $customerEmail) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$customerEmail

- string

This is the paying customer's email

-
- -

Response

- object

-
-
- -
- -
-

Sets the customer firstname

-
setFirstname(string $customerFirstname) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$customerFirstname

- string

This is the paying customer's firstname

-
- -

Response

- object

-
-
- -
- -
-

Sets the customer lastname

-
setLastname(string $customerLastname) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$customerLastname

- string

This is the paying customer's lastname

-
- -

Response

- object

-
-
- -
- - - - - -
-

Sets the payment page button text

-
setPayButtonText(string $payButtonText) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$payButtonText

- string

This is the text that should appear on the payment button on the Rave payment gateway.

-
- -

Response

- object

-
-
- -
- -
-

Sets the allowed payment methods

-
setPaymentMethod(string $paymentMethod) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$paymentMethod

- string

The allowed payment methods. Can be card, account or both

-
- -

Response

- object

-
-
- -
- -
-

Sets the customer phonenumber

-
setPhoneNumber(string $customerPhone) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$customerPhone

- string

This is the paying customer's phonenumber

-
- -

Response

- object

-
-
- -
- -
-

Sets the transaction redirect url

-
setRedirectUrl(string $redirectUrl) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$redirectUrl

- string

This is where the Rave payment gateway will redirect to after completing a payment

-
- -

Response

- object

-
-
- -
- -
-

Sets the payment page title

-
setTitle(string $customTitle) : object
-
-
- - -
-
-
- - -
- -

Arguments

-
-

$customTitle

- string

A title for the payment. It can be the product name, your business name or anything short and descriptive

-
- -

Response

- object

-
-
- -
- - -

Properties

- -
-

publicKey

-
publicKey : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

secretKey

-
secretKey : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

amount

-
amount : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

paymentMethod

-
paymentMethod : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

customDescription

-
customDescription : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- - - -
-

customTitle

-
customTitle : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

country

-
country : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

currency

-
currency : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

customerEmail

-
customerEmail : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

customerFirstname

-
customerFirstname : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

customerLastname

-
customerLastname : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

customerPhone

-
customerPhone : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

txref

-
txref : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

integrityHash

-
integrityHash : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

payButtonText

-
payButtonText : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

redirectUrl

-
redirectUrl : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

meta

-
meta : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

env

-
env : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

transactionPrefix

-
transactionPrefix : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

logger

-
logger : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

handler

-
handler : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

stagingUrl

-
stagingUrl : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

liveUrl

-
liveUrl : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

baseUrl

-
baseUrl : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

transactionData

-
transactionData : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

overrideTransactionReference

-
overrideTransactionReference : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
- -
-

requeryCount

-
requeryCount : 
-
-
-
-
-
- - - - - - -
- - -
- -

Type(s)

- -
-
-
-
-
- - -
-
- -
- - - - diff --git a/docs/css/bootstrap-responsive.css b/docs/css/bootstrap-responsive.css deleted file mode 100644 index 4b032cd..0000000 --- a/docs/css/bootstrap-responsive.css +++ /dev/null @@ -1,567 +0,0 @@ -/*! - * Bootstrap Responsive v2.0.0 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.hidden { - display: none; - visibility: hidden; -} -@media (max-width: 480px) { - .nav-collapse { - -webkit-transform: translate3d(0, 0, 0); - } - .page-header h1 small { - display: block; - line-height: 18px; - } - input[class*="span"], - select[class*="span"], - textarea[class*="span"], - .uneditable-input { - display: block; - width: 100%; - height: 28px; - /* Make inputs at least the height of their button counterpart */ - - /* Makes inputs behave like true block-level elements */ - - -webkit-box-sizing: border-box; - /* Older Webkit */ - - -moz-box-sizing: border-box; - /* Older FF */ - - -ms-box-sizing: border-box; - /* IE8 */ - - box-sizing: border-box; - /* CSS3 spec*/ - - } - .input-prepend input[class*="span"], .input-append input[class*="span"] { - width: auto; - } - input[type="checkbox"], input[type="radio"] { - border: 1px solid #ccc; - } - .form-horizontal .control-group > label { - float: none; - width: auto; - padding-top: 0; - text-align: left; - } - .form-horizontal .controls { - margin-left: 0; - } - .form-horizontal .control-list { - padding-top: 0; - } - .form-horizontal .form-actions { - padding-left: 10px; - padding-right: 10px; - } - .modal { - position: absolute; - top: 10px; - left: 10px; - right: 10px; - width: auto; - margin: 0; - } - .modal.fade.in { - top: auto; - } - .modal-header .close { - padding: 10px; - margin: -10px; - } - .carousel-caption { - position: static; - } -} -@media (max-width: 768px) { - .container { - width: auto; - padding: 0 20px; - } - .row-fluid { - width: 100%; - } - .row { - margin-left: 0; - } - .row > [class*="span"], .row-fluid > [class*="span"] { - float: none; - display: block; - width: auto; - margin: 0; - } -} -@media (min-width: 768px) and (max-width: 980px) { - .row { - margin-left: -20px; - *zoom: 1; - } - .row:before, .row:after { - display: table; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - margin-left: 20px; - } - .span1 { - width: 42px; - } - .span2 { - width: 104px; - } - .span3 { - width: 166px; - } - .span4 { - width: 228px; - } - .span5 { - width: 290px; - } - .span6 { - width: 352px; - } - .span7 { - width: 414px; - } - .span8 { - width: 476px; - } - .span9 { - width: 538px; - } - .span10 { - width: 600px; - } - .span11 { - width: 662px; - } - .span12, .container { - width: 724px; - } - .offset1 { - margin-left: 82px; - } - .offset2 { - margin-left: 144px; - } - .offset3 { - margin-left: 206px; - } - .offset4 { - margin-left: 268px; - } - .offset5 { - margin-left: 330px; - } - .offset6 { - margin-left: 392px; - } - .offset7 { - margin-left: 454px; - } - .offset8 { - margin-left: 516px; - } - .offset9 { - margin-left: 578px; - } - .offset10 { - margin-left: 640px; - } - .offset11 { - margin-left: 702px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, .row-fluid:after { - display: table; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid > [class*="span"] { - float: left; - margin-left: 2.762430939%; - } - .row-fluid > [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .span1 { - width: 5.801104972%; - } - .row-fluid .span2 { - width: 14.364640883%; - } - .row-fluid .span3 { - width: 22.928176794%; - } - .row-fluid .span4 { - width: 31.491712705%; - } - .row-fluid .span5 { - width: 40.055248616%; - } - .row-fluid .span6 { - width: 48.618784527%; - } - .row-fluid .span7 { - width: 57.182320438000005%; - } - .row-fluid .span8 { - width: 65.74585634900001%; - } - .row-fluid .span9 { - width: 74.30939226%; - } - .row-fluid .span10 { - width: 82.87292817100001%; - } - .row-fluid .span11 { - width: 91.436464082%; - } - .row-fluid .span12 { - width: 99.999999993%; - } - input.span1, textarea.span1, .uneditable-input.span1 { - width: 32px; - } - input.span2, textarea.span2, .uneditable-input.span2 { - width: 94px; - } - input.span3, textarea.span3, .uneditable-input.span3 { - width: 156px; - } - input.span4, textarea.span4, .uneditable-input.span4 { - width: 218px; - } - input.span5, textarea.span5, .uneditable-input.span5 { - width: 280px; - } - input.span6, textarea.span6, .uneditable-input.span6 { - width: 342px; - } - input.span7, textarea.span7, .uneditable-input.span7 { - width: 404px; - } - input.span8, textarea.span8, .uneditable-input.span8 { - width: 466px; - } - input.span9, textarea.span9, .uneditable-input.span9 { - width: 528px; - } - input.span10, textarea.span10, .uneditable-input.span10 { - width: 590px; - } - input.span11, textarea.span11, .uneditable-input.span11 { - width: 652px; - } - input.span12, textarea.span12, .uneditable-input.span12 { - width: 714px; - } -} -@media (max-width: 980px) { - body { - padding-top: 0; - } - .navbar-fixed-top { - position: static; - margin-bottom: 18px; - } - .navbar-fixed-top .navbar-inner { - padding: 5px; - } - .navbar .container { - width: auto; - padding: 0; - } - .navbar .brand { - padding-left: 10px; - padding-right: 10px; - margin: 0 0 0 -5px; - } - .navbar .nav-collapse { - clear: left; - } - .navbar .nav { - float: none; - margin: 0 0 9px; - } - .navbar .nav > li { - float: none; - } - .navbar .nav > li > a { - margin-bottom: 2px; - } - .navbar .nav > .divider-vertical { - display: none; - } - .navbar .nav > li > a, .navbar .dropdown-menu a { - padding: 6px 15px; - font-weight: bold; - color: #999999; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - .navbar .dropdown-menu li + li a { - margin-bottom: 2px; - } - .navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover { - background-color: #222222; - } - .navbar .dropdown-menu { - position: static; - top: auto; - left: auto; - float: none; - display: block; - max-width: none; - margin: 0 15px; - padding: 0; - background-color: transparent; - border: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - } - .navbar .dropdown-menu:before, .navbar .dropdown-menu:after { - display: none; - } - .navbar .dropdown-menu .divider { - display: none; - } - .navbar-form, .navbar-search { - float: none; - padding: 9px 15px; - margin: 9px 0; - border-top: 1px solid #222222; - border-bottom: 1px solid #222222; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - } - .navbar .nav.pull-right { - float: none; - margin-left: 0; - } - .navbar-static .navbar-inner { - padding-left: 10px; - padding-right: 10px; - } - .btn-navbar { - display: block; - } - .nav-collapse { - overflow: hidden; - height: 0; - } -} -@media (min-width: 980px) { - .nav-collapse.collapse { - height: auto !important; - } -} -@media (min-width: 1200px) { - .row { - margin-left: -30px; - *zoom: 1; - } - .row:before, .row:after { - display: table; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - margin-left: 30px; - } - .span1 { - width: 70px; - } - .span2 { - width: 170px; - } - .span3 { - width: 270px; - } - .span4 { - width: 370px; - } - .span5 { - width: 470px; - } - .span6 { - width: 570px; - } - .span7 { - width: 670px; - } - .span8 { - width: 770px; - } - .span9 { - width: 870px; - } - .span10 { - width: 970px; - } - .span11 { - width: 1070px; - } - .span12, .container { - width: 1170px; - } - .offset1 { - margin-left: 130px; - } - .offset2 { - margin-left: 230px; - } - .offset3 { - margin-left: 330px; - } - .offset4 { - margin-left: 430px; - } - .offset5 { - margin-left: 530px; - } - .offset6 { - margin-left: 630px; - } - .offset7 { - margin-left: 730px; - } - .offset8 { - margin-left: 830px; - } - .offset9 { - margin-left: 930px; - } - .offset10 { - margin-left: 1030px; - } - .offset11 { - margin-left: 1130px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, .row-fluid:after { - display: table; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid > [class*="span"] { - float: left; - margin-left: 2.564102564%; - } - .row-fluid > [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .span1 { - width: 5.982905983%; - } - .row-fluid .span2 { - width: 14.529914530000001%; - } - .row-fluid .span3 { - width: 23.076923077%; - } - .row-fluid .span4 { - width: 31.623931624%; - } - .row-fluid .span5 { - width: 40.170940171000005%; - } - .row-fluid .span6 { - width: 48.717948718%; - } - .row-fluid .span7 { - width: 57.264957265%; - } - .row-fluid .span8 { - width: 65.81196581200001%; - } - .row-fluid .span9 { - width: 74.358974359%; - } - .row-fluid .span10 { - width: 82.905982906%; - } - .row-fluid .span11 { - width: 91.45299145300001%; - } - .row-fluid .span12 { - width: 100%; - } - input.span1, textarea.span1, .uneditable-input.span1 { - width: 60px; - } - input.span2, textarea.span2, .uneditable-input.span2 { - width: 160px; - } - input.span3, textarea.span3, .uneditable-input.span3 { - width: 260px; - } - input.span4, textarea.span4, .uneditable-input.span4 { - width: 360px; - } - input.span5, textarea.span5, .uneditable-input.span5 { - width: 460px; - } - input.span6, textarea.span6, .uneditable-input.span6 { - width: 560px; - } - input.span7, textarea.span7, .uneditable-input.span7 { - width: 660px; - } - input.span8, textarea.span8, .uneditable-input.span8 { - width: 760px; - } - input.span9, textarea.span9, .uneditable-input.span9 { - width: 860px; - } - input.span10, textarea.span10, .uneditable-input.span10 { - width: 960px; - } - input.span11, textarea.span11, .uneditable-input.span11 { - width: 1060px; - } - input.span12, textarea.span12, .uneditable-input.span12 { - width: 1160px; - } - .thumbnails { - margin-left: -30px; - } - .thumbnails > li { - margin-left: 30px; - } -} diff --git a/docs/css/bootstrap-responsive.min.css b/docs/css/bootstrap-responsive.min.css deleted file mode 100644 index bc3f2ab..0000000 --- a/docs/css/bootstrap-responsive.min.css +++ /dev/null @@ -1,3 +0,0 @@ - -.hidden{display:none;visibility:hidden;} -@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:18px;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} .input-prepend input[class*="span"],.input-append input[class*="span"]{width:auto;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{position:absolute;top:10px;left:10px;right:10px;width:auto;margin:0;}.modal.fade.in{top:auto;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (max-width:768px){.container{width:auto;padding:0 20px;} .row-fluid{width:100%;} .row{margin-left:0;} .row>[class*="span"],.row-fluid>[class*="span"]{float:none;display:block;width:auto;margin:0;}}@media (min-width:768px) and (max-width:980px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .span1{width:42px;} .span2{width:104px;} .span3{width:166px;} .span4{width:228px;} .span5{width:290px;} .span6{width:352px;} .span7{width:414px;} .span8{width:476px;} .span9{width:538px;} .span10{width:600px;} .span11{width:662px;} .span12,.container{width:724px;} .offset1{margin-left:82px;} .offset2{margin-left:144px;} .offset3{margin-left:206px;} .offset4{margin-left:268px;} .offset5{margin-left:330px;} .offset6{margin-left:392px;} .offset7{margin-left:454px;} .offset8{margin-left:516px;} .offset9{margin-left:578px;} .offset10{margin-left:640px;} .offset11{margin-left:702px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.762430939%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.801104972%;} .row-fluid .span2{width:14.364640883%;} .row-fluid .span3{width:22.928176794%;} .row-fluid .span4{width:31.491712705%;} .row-fluid .span5{width:40.055248616%;} .row-fluid .span6{width:48.618784527%;} .row-fluid .span7{width:57.182320438000005%;} .row-fluid .span8{width:65.74585634900001%;} .row-fluid .span9{width:74.30939226%;} .row-fluid .span10{width:82.87292817100001%;} .row-fluid .span11{width:91.436464082%;} .row-fluid .span12{width:99.999999993%;} input.span1,textarea.span1,.uneditable-input.span1{width:32px;} input.span2,textarea.span2,.uneditable-input.span2{width:94px;} input.span3,textarea.span3,.uneditable-input.span3{width:156px;} input.span4,textarea.span4,.uneditable-input.span4{width:218px;} input.span5,textarea.span5,.uneditable-input.span5{width:280px;} input.span6,textarea.span6,.uneditable-input.span6{width:342px;} input.span7,textarea.span7,.uneditable-input.span7{width:404px;} input.span8,textarea.span8,.uneditable-input.span8{width:466px;} input.span9,textarea.span9,.uneditable-input.span9{width:528px;} input.span10,textarea.span10,.uneditable-input.span10{width:590px;} input.span11,textarea.span11,.uneditable-input.span11{width:652px;} input.span12,textarea.span12,.uneditable-input.span12{width:714px;}}@media (max-width:980px){body{padding-top:0;} .navbar-fixed-top{position:static;margin-bottom:18px;} .navbar-fixed-top .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .navbar .nav-collapse{clear:left;} .navbar .nav{float:none;margin:0 0 9px;} .navbar .nav>li{float:none;} .navbar .nav>li>a{margin-bottom:2px;} .navbar .nav>.divider-vertical{display:none;} .navbar .nav>li>a,.navbar .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .navbar .dropdown-menu li+li a{margin-bottom:2px;} .navbar .nav>li>a:hover,.navbar .dropdown-menu a:hover{background-color:#222222;} .navbar .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .navbar .dropdown-menu:before,.navbar .dropdown-menu:after{display:none;} .navbar .dropdown-menu .divider{display:none;} .navbar-form,.navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222222;border-bottom:1px solid #222222;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);} .navbar .nav.pull-right{float:none;margin-left:0;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;} .btn-navbar{display:block;} .nav-collapse{overflow:hidden;height:0;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:30px;} .span1{width:70px;} .span2{width:170px;} .span3{width:270px;} .span4{width:370px;} .span5{width:470px;} .span6{width:570px;} .span7{width:670px;} .span8{width:770px;} .span9{width:870px;} .span10{width:970px;} .span11{width:1070px;} .span12,.container{width:1170px;} .offset1{margin-left:130px;} .offset2{margin-left:230px;} .offset3{margin-left:330px;} .offset4{margin-left:430px;} .offset5{margin-left:530px;} .offset6{margin-left:630px;} .offset7{margin-left:730px;} .offset8{margin-left:830px;} .offset9{margin-left:930px;} .offset10{margin-left:1030px;} .offset11{margin-left:1130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.564102564%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.982905983%;} .row-fluid .span2{width:14.529914530000001%;} .row-fluid .span3{width:23.076923077%;} .row-fluid .span4{width:31.623931624%;} .row-fluid .span5{width:40.170940171000005%;} .row-fluid .span6{width:48.717948718%;} .row-fluid .span7{width:57.264957265%;} .row-fluid .span8{width:65.81196581200001%;} .row-fluid .span9{width:74.358974359%;} .row-fluid .span10{width:82.905982906%;} .row-fluid .span11{width:91.45299145300001%;} .row-fluid .span12{width:100%;} input.span1,textarea.span1,.uneditable-input.span1{width:60px;} input.span2,textarea.span2,.uneditable-input.span2{width:160px;} input.span3,textarea.span3,.uneditable-input.span3{width:260px;} input.span4,textarea.span4,.uneditable-input.span4{width:360px;} input.span5,textarea.span5,.uneditable-input.span5{width:460px;} input.span6,textarea.span6,.uneditable-input.span6{width:560px;} input.span7,textarea.span7,.uneditable-input.span7{width:660px;} input.span8,textarea.span8,.uneditable-input.span8{width:760px;} input.span9,textarea.span9,.uneditable-input.span9{width:860px;} input.span10,textarea.span10,.uneditable-input.span10{width:960px;} input.span11,textarea.span11,.uneditable-input.span11{width:1060px;} input.span12,textarea.span12,.uneditable-input.span12{width:1160px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;}} diff --git a/docs/css/bootstrap.css b/docs/css/bootstrap.css deleted file mode 100644 index 563050c..0000000 --- a/docs/css/bootstrap.css +++ /dev/null @@ -1,3370 +0,0 @@ -/*! - * Bootstrap v2.0.0 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section { - display: block; -} -audio, canvas, video { - display: inline-block; - *display: inline; - *zoom: 1; -} -audio:not([controls]) { - display: none; -} -html { - font-size: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} -a:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -a:hover, a:active { - outline: 0; -} -sub, sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} -sup { - top: -0.5em; -} -sub { - bottom: -0.25em; -} -img { - max-width: 100%; - height: auto; - border: 0; - -ms-interpolation-mode: bicubic; -} -button, -input, -select, -textarea { - margin: 0; - font-size: 100%; - vertical-align: middle; -} -button, input { - *overflow: visible; - line-height: normal; -} -button::-moz-focus-inner, input::-moz-focus-inner { - padding: 0; - border: 0; -} -button, -input[type="button"], -input[type="reset"], -input[type="submit"] { - cursor: pointer; - -webkit-appearance: button; -} -input[type="search"] { - -webkit-appearance: textfield; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} -input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { - -webkit-appearance: none; -} -textarea { - overflow: auto; - vertical-align: top; -} -body { - margin: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - line-height: 18px; - color: #333333; - background-color: #ffffff; -} -a { - color: #0088cc; - text-decoration: none; -} -a:hover { - color: #005580; - text-decoration: underline; -} -.row { - margin-left: -20px; - *zoom: 1; -} -.row:before, .row:after { - display: table; - content: ""; -} -.row:after { - clear: both; -} -[class*="span"] { - float: left; - margin-left: 20px; -} -.span1 { - width: 60px; -} -.span2 { - width: 140px; -} -.span3 { - width: 220px; -} -.span4 { - width: 300px; -} -.span5 { - width: 380px; -} -.span6 { - width: 460px; -} -.span7 { - width: 540px; -} -.span8 { - width: 620px; -} -.span9 { - width: 700px; -} -.span10 { - width: 780px; -} -.span11 { - width: 860px; -} -.span12, .container { - width: 940px; -} -.offset1 { - margin-left: 100px; -} -.offset2 { - margin-left: 180px; -} -.offset3 { - margin-left: 260px; -} -.offset4 { - margin-left: 340px; -} -.offset5 { - margin-left: 420px; -} -.offset6 { - margin-left: 500px; -} -.offset7 { - margin-left: 580px; -} -.offset8 { - margin-left: 660px; -} -.offset9 { - margin-left: 740px; -} -.offset10 { - margin-left: 820px; -} -.offset11 { - margin-left: 900px; -} -.row-fluid { - width: 100%; - *zoom: 1; -} -.row-fluid:before, .row-fluid:after { - display: table; - content: ""; -} -.row-fluid:after { - clear: both; -} -.row-fluid > [class*="span"] { - float: left; - margin-left: 2.127659574%; -} -.row-fluid > [class*="span"]:first-child { - margin-left: 0; -} -.row-fluid .span1 { - width: 6.382978723%; -} -.row-fluid .span2 { - width: 14.89361702%; -} -.row-fluid .span3 { - width: 23.404255317%; -} -.row-fluid .span4 { - width: 31.914893614%; -} -.row-fluid .span5 { - width: 40.425531911%; -} -.row-fluid .span6 { - width: 48.93617020799999%; -} -.row-fluid .span7 { - width: 57.446808505%; -} -.row-fluid .span8 { - width: 65.95744680199999%; -} -.row-fluid .span9 { - width: 74.468085099%; -} -.row-fluid .span10 { - width: 82.97872339599999%; -} -.row-fluid .span11 { - width: 91.489361693%; -} -.row-fluid .span12 { - width: 99.99999998999999%; -} -.container { - width: 940px; - margin-left: auto; - margin-right: auto; - *zoom: 1; -} -.container:before, .container:after { - display: table; - content: ""; -} -.container:after { - clear: both; -} -.container-fluid { - padding-left: 20px; - padding-right: 20px; - *zoom: 1; -} -.container-fluid:before, .container-fluid:after { - display: table; - content: ""; -} -.container-fluid:after { - clear: both; -} -p { - margin: 0 0 9px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - line-height: 18px; -} -p small { - font-size: 11px; - color: #999999; -} -.lead { - margin-bottom: 18px; - font-size: 20px; - font-weight: 200; - line-height: 27px; -} -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 0; - font-weight: bold; - color: #333333; - text-rendering: optimizelegibility; -} -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small { - font-weight: normal; - color: #999999; -} -h1 { - font-size: 30px; - line-height: 36px; -} -h1 small { - font-size: 18px; -} -h2 { - font-size: 24px; - line-height: 36px; -} -h2 small { - font-size: 18px; -} -h3 { - line-height: 27px; - font-size: 18px; -} -h3 small { - font-size: 14px; -} -h4, h5, h6 { - line-height: 18px; -} -h4 { - font-size: 14px; -} -h4 small { - font-size: 12px; -} -h5 { - font-size: 12px; -} -h6 { - font-size: 11px; - color: #999999; - text-transform: uppercase; -} -.page-header { - padding-bottom: 17px; - margin: 18px 0; - border-bottom: 1px solid #eeeeee; -} -.page-header h1 { - line-height: 1; -} -ul, ol { - padding: 0; - margin: 0 0 9px 25px; -} -ul ul, -ul ol, -ol ol, -ol ul { - margin-bottom: 0; -} -ul { - list-style: disc; -} -ol { - list-style: decimal; -} -li { - line-height: 18px; -} -ul.unstyled { - margin-left: 0; - list-style: none; -} -dl { - margin-bottom: 18px; -} -dt, dd { - line-height: 18px; -} -dt { - font-weight: bold; -} -dd { - margin-left: 9px; -} -hr { - margin: 18px 0; - border: 0; - border-top: 1px solid #e5e5e5; - border-bottom: 1px solid #ffffff; -} -strong { - font-weight: bold; -} -em { - font-style: italic; -} -.muted { - color: #999999; -} -abbr { - font-size: 90%; - text-transform: uppercase; - border-bottom: 1px dotted #ddd; - cursor: help; -} -blockquote { - padding: 0 0 0 15px; - margin: 0 0 18px; - border-left: 5px solid #eeeeee; -} -blockquote p { - margin-bottom: 0; - font-size: 16px; - font-weight: 300; - line-height: 22.5px; -} -blockquote small { - display: block; - line-height: 18px; - color: #999999; -} -blockquote small:before { - content: '\2014 \00A0'; -} -blockquote.pull-right { - float: right; - padding-left: 0; - padding-right: 15px; - border-left: 0; - border-right: 5px solid #eeeeee; -} -blockquote.pull-right p, blockquote.pull-right small { - text-align: right; -} -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} -address { - display: block; - margin-bottom: 18px; - line-height: 18px; - font-style: normal; -} -small { - font-size: 100%; -} -cite { - font-style: normal; -} -code, pre { - padding: 0 3px 2px; - font-family: Menlo, Monaco, "Courier New", monospace; - font-size: 12px; - color: #333333; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -code { - padding: 3px 4px; - color: #d14; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; -} -pre { - display: block; - padding: 8.5px; - margin: 0 0 9px; - font-size: 12px; - line-height: 18px; - background-color: #f5f5f5; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.15); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - white-space: pre; - white-space: pre-wrap; - word-break: break-all; -} -pre.prettyprint { - margin-bottom: 18px; -} -pre code { - padding: 0; - background-color: transparent; -} -form { - margin: 0 0 18px; -} -fieldset { - padding: 0; - margin: 0; - border: 0; -} -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 27px; - font-size: 19.5px; - line-height: 36px; - color: #333333; - border: 0; - border-bottom: 1px solid #eee; -} -label, -input, -button, -select, -textarea { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: normal; - line-height: 18px; -} -label { - display: block; - margin-bottom: 5px; - color: #333333; -} -input, -textarea, -select, -.uneditable-input { - display: inline-block; - width: 210px; - height: 18px; - padding: 4px; - margin-bottom: 9px; - font-size: 13px; - line-height: 18px; - color: #555555; - border: 1px solid #ccc; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.uneditable-textarea { - width: auto; - height: auto; -} -label input, label textarea, label select { - display: block; -} -input[type="image"], input[type="checkbox"], input[type="radio"] { - width: auto; - height: auto; - padding: 0; - margin: 3px 0; - *margin-top: 0; - /* IE7 */ - - line-height: normal; - border: 0; - cursor: pointer; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -input[type="file"] { - padding: initial; - line-height: initial; - border: initial; - background-color: #ffffff; - background-color: initial; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -input[type="button"], input[type="reset"], input[type="submit"] { - width: auto; - height: auto; -} -select, input[type="file"] { - height: 28px; - /* In IE7, the height of the select element cannot be changed by height, only font-size */ - - *margin-top: 4px; - /* For IE7, add top margin to align select with labels */ - - line-height: 28px; -} -select { - width: 220px; - background-color: #ffffff; -} -select[multiple], select[size] { - height: auto; -} -input[type="image"] { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -textarea { - height: auto; -} -input[type="hidden"] { - display: none; -} -.radio, .checkbox { - padding-left: 18px; -} -.radio input[type="radio"], .checkbox input[type="checkbox"] { - float: left; - margin-left: -18px; -} -.controls > .radio:first-child, .controls > .checkbox:first-child { - padding-top: 5px; -} -.radio.inline, .checkbox.inline { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; -} -.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { - margin-left: 10px; -} -.controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child { - padding-top: 0; -} -input, textarea { - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; - -moz-transition: border linear 0.2s, box-shadow linear 0.2s; - -ms-transition: border linear 0.2s, box-shadow linear 0.2s; - -o-transition: border linear 0.2s, box-shadow linear 0.2s; - transition: border linear 0.2s, box-shadow linear 0.2s; -} -input:focus, textarea:focus { - border-color: rgba(82, 168, 236, 0.8); - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - outline: 0; - outline: thin dotted \9; - /* IE6-8 */ - -} -input[type="file"]:focus, input[type="checkbox"]:focus, select:focus { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.input-mini { - width: 60px; -} -.input-small { - width: 90px; -} -.input-medium { - width: 150px; -} -.input-large { - width: 210px; -} -.input-xlarge { - width: 270px; -} -.input-xxlarge { - width: 530px; -} -input[class*="span"], -select[class*="span"], -textarea[class*="span"], -.uneditable-input { - float: none; - margin-left: 0; -} -input.span1, textarea.span1, .uneditable-input.span1 { - width: 50px; -} -input.span2, textarea.span2, .uneditable-input.span2 { - width: 130px; -} -input.span3, textarea.span3, .uneditable-input.span3 { - width: 210px; -} -input.span4, textarea.span4, .uneditable-input.span4 { - width: 290px; -} -input.span5, textarea.span5, .uneditable-input.span5 { - width: 370px; -} -input.span6, textarea.span6, .uneditable-input.span6 { - width: 450px; -} -input.span7, textarea.span7, .uneditable-input.span7 { - width: 530px; -} -input.span8, textarea.span8, .uneditable-input.span8 { - width: 610px; -} -input.span9, textarea.span9, .uneditable-input.span9 { - width: 690px; -} -input.span10, textarea.span10, .uneditable-input.span10 { - width: 770px; -} -input.span11, textarea.span11, .uneditable-input.span11 { - width: 850px; -} -input.span12, textarea.span12, .uneditable-input.span12 { - width: 930px; -} -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - background-color: #f5f5f5; - border-color: #ddd; - cursor: not-allowed; -} -.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline { - color: #c09853; -} -.control-group.warning input, .control-group.warning select, .control-group.warning textarea { - color: #c09853; - border-color: #c09853; -} -.control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus { - border-color: #a47e3c; - -webkit-box-shadow: 0 0 6px #dbc59e; - -moz-box-shadow: 0 0 6px #dbc59e; - box-shadow: 0 0 6px #dbc59e; -} -.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on { - color: #c09853; - background-color: #fcf8e3; - border-color: #c09853; -} -.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline { - color: #b94a48; -} -.control-group.error input, .control-group.error select, .control-group.error textarea { - color: #b94a48; - border-color: #b94a48; -} -.control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus { - border-color: #953b39; - -webkit-box-shadow: 0 0 6px #d59392; - -moz-box-shadow: 0 0 6px #d59392; - box-shadow: 0 0 6px #d59392; -} -.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on { - color: #b94a48; - background-color: #f2dede; - border-color: #b94a48; -} -.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline { - color: #468847; -} -.control-group.success input, .control-group.success select, .control-group.success textarea { - color: #468847; - border-color: #468847; -} -.control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus { - border-color: #356635; - -webkit-box-shadow: 0 0 6px #7aba7b; - -moz-box-shadow: 0 0 6px #7aba7b; - box-shadow: 0 0 6px #7aba7b; -} -.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on { - color: #468847; - background-color: #dff0d8; - border-color: #468847; -} -input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid { - color: #b94a48; - border-color: #ee5f5b; -} -input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus { - border-color: #e9322d; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; - box-shadow: 0 0 6px #f8b9b7; -} -.form-actions { - padding: 17px 20px 18px; - margin-top: 18px; - margin-bottom: 18px; - background-color: #f5f5f5; - border-top: 1px solid #ddd; -} -.uneditable-input { - display: block; - background-color: #ffffff; - border-color: #eee; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - cursor: not-allowed; -} -:-moz-placeholder { - color: #999999; -} -::-webkit-input-placeholder { - color: #999999; -} -.help-block { - margin-top: 5px; - margin-bottom: 0; - color: #999999; -} -.help-inline { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - margin-bottom: 9px; - vertical-align: middle; - padding-left: 5px; -} -.input-prepend, .input-append { - margin-bottom: 5px; - *zoom: 1; -} -.input-prepend:before, -.input-append:before, -.input-prepend:after, -.input-append:after { - display: table; - content: ""; -} -.input-prepend:after, .input-append:after { - clear: both; -} -.input-prepend input, -.input-append input, -.input-prepend .uneditable-input, -.input-append .uneditable-input { - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; -} -.input-prepend input:focus, -.input-append input:focus, -.input-prepend .uneditable-input:focus, -.input-append .uneditable-input:focus { - position: relative; - z-index: 2; -} -.input-prepend .uneditable-input, .input-append .uneditable-input { - border-left-color: #ccc; -} -.input-prepend .add-on, .input-append .add-on { - float: left; - display: block; - width: auto; - min-width: 16px; - height: 18px; - margin-right: -1px; - padding: 4px 5px; - font-weight: normal; - line-height: 18px; - color: #999999; - text-align: center; - text-shadow: 0 1px 0 #ffffff; - background-color: #f5f5f5; - border: 1px solid #ccc; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; -} -.input-prepend .active, .input-append .active { - background-color: #a9dba9; - border-color: #46a546; -} -.input-prepend .add-on { - *margin-top: 1px; - /* IE6-7 */ - -} -.input-append input, .input-append .uneditable-input { - float: left; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; -} -.input-append .uneditable-input { - border-right-color: #ccc; -} -.input-append .add-on { - margin-right: 0; - margin-left: -1px; - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; -} -.input-append input:first-child { - *margin-left: -160px; -} -.input-append input:first-child + .add-on { - *margin-left: -21px; -} -.search-query { - padding-left: 14px; - padding-right: 14px; - margin-bottom: 0; - -webkit-border-radius: 14px; - -moz-border-radius: 14px; - border-radius: 14px; -} -.form-search input, -.form-inline input, -.form-horizontal input, -.form-search textarea, -.form-inline textarea, -.form-horizontal textarea, -.form-search select, -.form-inline select, -.form-horizontal select, -.form-search .help-inline, -.form-inline .help-inline, -.form-horizontal .help-inline, -.form-search .uneditable-input, -.form-inline .uneditable-input, -.form-horizontal .uneditable-input { - display: inline-block; - margin-bottom: 0; -} -.form-search label, -.form-inline label, -.form-search .input-append, -.form-inline .input-append, -.form-search .input-prepend, -.form-inline .input-prepend { - display: inline-block; -} -.form-search .input-append .add-on, -.form-inline .input-prepend .add-on, -.form-search .input-append .add-on, -.form-inline .input-prepend .add-on { - vertical-align: middle; -} -.control-group { - margin-bottom: 9px; -} -.form-horizontal legend + .control-group { - margin-top: 18px; - -webkit-margin-top-collapse: separate; -} -.form-horizontal .control-group { - margin-bottom: 18px; - *zoom: 1; -} -.form-horizontal .control-group:before, .form-horizontal .control-group:after { - display: table; - content: ""; -} -.form-horizontal .control-group:after { - clear: both; -} -.form-horizontal .control-group > label { - float: left; - width: 140px; - padding-top: 5px; - text-align: right; -} -.form-horizontal .controls { - margin-left: 160px; -} -.form-horizontal .form-actions { - padding-left: 160px; -} -table { - max-width: 100%; - border-collapse: collapse; - border-spacing: 0; -} -.table { - width: 100%; - margin-bottom: 18px; -} -.table th, .table td { - padding: 8px; - line-height: 18px; - text-align: left; - border-top: 1px solid #ddd; -} -.table th { - font-weight: bold; - vertical-align: bottom; -} -.table td { - vertical-align: top; -} -.table thead:first-child tr th, .table thead:first-child tr td { - border-top: 0; -} -.table tbody + tbody { - border-top: 2px solid #ddd; -} -.table-condensed th, .table-condensed td { - padding: 4px 5px; -} -.table-bordered { - border: 1px solid #ddd; - border-collapse: separate; - *border-collapse: collapsed; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.table-bordered th + th, -.table-bordered td + td, -.table-bordered th + td, -.table-bordered td + th { - border-left: 1px solid #ddd; -} -.table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td { - border-top: 0; -} -.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child { - -webkit-border-radius: 4px 0 0 0; - -moz-border-radius: 4px 0 0 0; - border-radius: 4px 0 0 0; -} -.table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child { - -webkit-border-radius: 0 4px 0 0; - -moz-border-radius: 0 4px 0 0; - border-radius: 0 4px 0 0; -} -.table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child { - -webkit-border-radius: 0 0 0 4px; - -moz-border-radius: 0 0 0 4px; - border-radius: 0 0 0 4px; -} -.table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child { - -webkit-border-radius: 0 0 4px 0; - -moz-border-radius: 0 0 4px 0; - border-radius: 0 0 4px 0; -} -.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th { - background-color: #f9f9f9; -} -table .span1 { - float: none; - width: 44px; - margin-left: 0; -} -table .span2 { - float: none; - width: 124px; - margin-left: 0; -} -table .span3 { - float: none; - width: 204px; - margin-left: 0; -} -table .span4 { - float: none; - width: 284px; - margin-left: 0; -} -table .span5 { - float: none; - width: 364px; - margin-left: 0; -} -table .span6 { - float: none; - width: 444px; - margin-left: 0; -} -table .span7 { - float: none; - width: 524px; - margin-left: 0; -} -table .span8 { - float: none; - width: 604px; - margin-left: 0; -} -table .span9 { - float: none; - width: 684px; - margin-left: 0; -} -table .span10 { - float: none; - width: 764px; - margin-left: 0; -} -table .span11 { - float: none; - width: 844px; - margin-left: 0; -} -table .span12 { - float: none; - width: 924px; - margin-left: 0; -} -[class^="icon-"] { - display: inline-block; - width: 14px; - height: 14px; - vertical-align: text-top; - background-image: url(../img/glyphicons-halflings.png); - background-position: 14px 14px; - background-repeat: no-repeat; - *margin-right: .3em; -} -[class^="icon-"]:last-child { - *margin-left: 0; -} -.icon-white { - background-image: url(../img/glyphicons-halflings-white.png); -} -.icon-glass { - background-position: 0 0; -} -.icon-music { - background-position: -24px 0; -} -.icon-search { - background-position: -48px 0; -} -.icon-envelope { - background-position: -72px 0; -} -.icon-heart { - background-position: -96px 0; -} -.icon-star { - background-position: -120px 0; -} -.icon-star-empty { - background-position: -144px 0; -} -.icon-user { - background-position: -168px 0; -} -.icon-film { - background-position: -192px 0; -} -.icon-th-large { - background-position: -216px 0; -} -.icon-th { - background-position: -240px 0; -} -.icon-th-list { - background-position: -264px 0; -} -.icon-ok { - background-position: -288px 0; -} -.icon-remove { - background-position: -312px 0; -} -.icon-zoom-in { - background-position: -336px 0; -} -.icon-zoom-out { - background-position: -360px 0; -} -.icon-off { - background-position: -384px 0; -} -.icon-signal { - background-position: -408px 0; -} -.icon-cog { - background-position: -432px 0; -} -.icon-trash { - background-position: -456px 0; -} -.icon-home { - background-position: 0 -24px; -} -.icon-file { - background-position: -24px -24px; -} -.icon-time { - background-position: -48px -24px; -} -.icon-road { - background-position: -72px -24px; -} -.icon-download-alt { - background-position: -96px -24px; -} -.icon-download { - background-position: -120px -24px; -} -.icon-upload { - background-position: -144px -24px; -} -.icon-inbox { - background-position: -168px -24px; -} -.icon-play-circle { - background-position: -192px -24px; -} -.icon-repeat { - background-position: -216px -24px; -} -.icon-refresh { - background-position: -240px -24px; -} -.icon-list-alt { - background-position: -264px -24px; -} -.icon-lock { - background-position: -287px -24px; -} -.icon-flag { - background-position: -312px -24px; -} -.icon-headphones { - background-position: -336px -24px; -} -.icon-volume-off { - background-position: -360px -24px; -} -.icon-volume-down { - background-position: -384px -24px; -} -.icon-volume-up { - background-position: -408px -24px; -} -.icon-qrcode { - background-position: -432px -24px; -} -.icon-barcode { - background-position: -456px -24px; -} -.icon-tag { - background-position: 0 -48px; -} -.icon-tags { - background-position: -25px -48px; -} -.icon-book { - background-position: -48px -48px; -} -.icon-bookmark { - background-position: -72px -48px; -} -.icon-print { - background-position: -96px -48px; -} -.icon-camera { - background-position: -120px -48px; -} -.icon-font { - background-position: -144px -48px; -} -.icon-bold { - background-position: -167px -48px; -} -.icon-italic { - background-position: -192px -48px; -} -.icon-text-height { - background-position: -216px -48px; -} -.icon-text-width { - background-position: -240px -48px; -} -.icon-align-left { - background-position: -264px -48px; -} -.icon-align-center { - background-position: -288px -48px; -} -.icon-align-right { - background-position: -312px -48px; -} -.icon-align-justify { - background-position: -336px -48px; -} -.icon-list { - background-position: -360px -48px; -} -.icon-indent-left { - background-position: -384px -48px; -} -.icon-indent-right { - background-position: -408px -48px; -} -.icon-facetime-video { - background-position: -432px -48px; -} -.icon-picture { - background-position: -456px -48px; -} -.icon-pencil { - background-position: 0 -72px; -} -.icon-map-marker { - background-position: -24px -72px; -} -.icon-adjust { - background-position: -48px -72px; -} -.icon-tint { - background-position: -72px -72px; -} -.icon-edit { - background-position: -96px -72px; -} -.icon-share { - background-position: -120px -72px; -} -.icon-check { - background-position: -144px -72px; -} -.icon-move { - background-position: -168px -72px; -} -.icon-step-backward { - background-position: -192px -72px; -} -.icon-fast-backward { - background-position: -216px -72px; -} -.icon-backward { - background-position: -240px -72px; -} -.icon-play { - background-position: -264px -72px; -} -.icon-pause { - background-position: -288px -72px; -} -.icon-stop { - background-position: -312px -72px; -} -.icon-forward { - background-position: -336px -72px; -} -.icon-fast-forward { - background-position: -360px -72px; -} -.icon-step-forward { - background-position: -384px -72px; -} -.icon-eject { - background-position: -408px -72px; -} -.icon-chevron-left { - background-position: -432px -72px; -} -.icon-chevron-right { - background-position: -456px -72px; -} -.icon-plus-sign { - background-position: 0 -96px; -} -.icon-minus-sign { - background-position: -24px -96px; -} -.icon-remove-sign { - background-position: -48px -96px; -} -.icon-ok-sign { - background-position: -72px -96px; -} -.icon-question-sign { - background-position: -96px -96px; -} -.icon-info-sign { - background-position: -120px -96px; -} -.icon-screenshot { - background-position: -144px -96px; -} -.icon-remove-circle { - background-position: -168px -96px; -} -.icon-ok-circle { - background-position: -192px -96px; -} -.icon-ban-circle { - background-position: -216px -96px; -} -.icon-arrow-left { - background-position: -240px -96px; -} -.icon-arrow-right { - background-position: -264px -96px; -} -.icon-arrow-up { - background-position: -289px -96px; -} -.icon-arrow-down { - background-position: -312px -96px; -} -.icon-share-alt { - background-position: -336px -96px; -} -.icon-resize-full { - background-position: -360px -96px; -} -.icon-resize-small { - background-position: -384px -96px; -} -.icon-plus { - background-position: -408px -96px; -} -.icon-minus { - background-position: -433px -96px; -} -.icon-asterisk { - background-position: -456px -96px; -} -.icon-exclamation-sign { - background-position: 0 -120px; -} -.icon-gift { - background-position: -24px -120px; -} -.icon-leaf { - background-position: -48px -120px; -} -.icon-fire { - background-position: -72px -120px; -} -.icon-eye-open { - background-position: -96px -120px; -} -.icon-eye-close { - background-position: -120px -120px; -} -.icon-warning-sign { - background-position: -144px -120px; -} -.icon-plane { - background-position: -168px -120px; -} -.icon-calendar { - background-position: -192px -120px; -} -.icon-random { - background-position: -216px -120px; -} -.icon-comment { - background-position: -240px -120px; -} -.icon-magnet { - background-position: -264px -120px; -} -.icon-chevron-up { - background-position: -288px -120px; -} -.icon-chevron-down { - background-position: -313px -119px; -} -.icon-retweet { - background-position: -336px -120px; -} -.icon-shopping-cart { - background-position: -360px -120px; -} -.icon-folder-close { - background-position: -384px -120px; -} -.icon-folder-open { - background-position: -408px -120px; -} -.icon-resize-vertical { - background-position: -432px -119px; -} -.icon-resize-horizontal { - background-position: -456px -118px; -} -.dropdown { - position: relative; -} -.dropdown-toggle { - *margin-bottom: -3px; -} -.dropdown-toggle:active, .open .dropdown-toggle { - outline: 0; -} -.caret { - display: inline-block; - width: 0; - height: 0; - text-indent: -99999px; - *text-indent: 0; - vertical-align: top; - border-left: 4px solid transparent; - border-right: 4px solid transparent; - border-top: 4px solid #000000; - opacity: 0.3; - filter: alpha(opacity=30); - content: "\2193"; -} -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} -.dropdown:hover .caret, .open.dropdown .caret { - opacity: 1; - filter: alpha(opacity=100); -} -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - float: left; - display: none; - min-width: 160px; - max-width: 220px; - _width: 160px; - padding: 4px 0; - margin: 0; - list-style: none; - background-color: #ffffff; - border-color: #ccc; - border-color: rgba(0, 0, 0, 0.2); - border-style: solid; - border-width: 1px; - -webkit-border-radius: 0 0 5px 5px; - -moz-border-radius: 0 0 5px 5px; - border-radius: 0 0 5px 5px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; - *border-right-width: 2px; - *border-bottom-width: 2px; -} -.dropdown-menu.bottom-up { - top: auto; - bottom: 100%; - margin-bottom: 2px; -} -.dropdown-menu .divider { - height: 1px; - margin: 5px 1px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; - *width: 100%; - *margin: -5px 0 5px; -} -.dropdown-menu a { - display: block; - padding: 3px 15px; - clear: both; - font-weight: normal; - line-height: 18px; - color: #555555; - white-space: nowrap; -} -.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover { - color: #ffffff; - text-decoration: none; - background-color: #0088cc; -} -.dropdown.open { - *z-index: 1000; -} -.dropdown.open .dropdown-toggle { - color: #ffffff; - background: #ccc; - background: rgba(0, 0, 0, 0.3); -} -.dropdown.open .dropdown-menu { - display: block; -} -.typeahead { - margin-top: 2px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #eee; - border: 1px solid rgba(0, 0, 0, 0.05); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} -.fade { - -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -ms-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; - opacity: 0; -} -.fade.in { - opacity: 1; -} -.collapse { - -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -ms-transition: height 0.35s ease; - -o-transition: height 0.35s ease; - transition: height 0.35s ease; - position: relative; - overflow: hidden; - height: 0; -} -.collapse.in { - height: auto; -} -.close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 18px; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} -.close:hover { - color: #000000; - text-decoration: none; - opacity: 0.4; - filter: alpha(opacity=40); - cursor: pointer; -} -.btn { - display: inline-block; - padding: 4px 10px 4px; - font-size: 13px; - line-height: 18px; - color: #333333; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - background-color: #fafafa; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); - background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6); - background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); - background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); - background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); - background-repeat: no-repeat; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); - border: 1px solid #ccc; - border-bottom-color: #bbb; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - cursor: pointer; - *margin-left: .3em; -} -.btn:first-child { - *margin-left: 0; -} -.btn:hover { - color: #333333; - text-decoration: none; - background-color: #e6e6e6; - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -ms-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; -} -.btn:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn.active, .btn:active { - background-image: none; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - background-color: #e6e6e6; - background-color: #d9d9d9 \9; - color: rgba(0, 0, 0, 0.5); - outline: 0; -} -.btn.disabled, .btn[disabled] { - cursor: default; - background-image: none; - background-color: #e6e6e6; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.btn-large { - padding: 9px 14px; - font-size: 15px; - line-height: normal; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -.btn-large .icon { - margin-top: 1px; -} -.btn-small { - padding: 5px 9px; - font-size: 11px; - line-height: 16px; -} -.btn-small .icon { - margin-top: -1px; -} -.btn-primary, -.btn-primary:hover, -.btn-warning, -.btn-warning:hover, -.btn-danger, -.btn-danger:hover, -.btn-success, -.btn-success:hover, -.btn-info, -.btn-info:hover { - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - color: #ffffff; -} -.btn-primary.active, -.btn-warning.active, -.btn-danger.active, -.btn-success.active, -.btn-info.active { - color: rgba(255, 255, 255, 0.75); -} -.btn-primary { - background-color: #006dcc; - background-image: -moz-linear-gradient(top, #0088cc, #0044cc); - background-image: -ms-linear-gradient(top, #0088cc, #0044cc); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); - background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); - background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(top, #0088cc, #0044cc); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); - border-color: #0044cc #0044cc #002a80; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-primary:hover, -.btn-primary:active, -.btn-primary.active, -.btn-primary.disabled, -.btn-primary[disabled] { - background-color: #0044cc; -} -.btn-primary:active, .btn-primary.active { - background-color: #003399 \9; -} -.btn-warning { - background-color: #faa732; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -ms-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(top, #fbb450, #f89406); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0); - border-color: #f89406 #f89406 #ad6704; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-warning:hover, -.btn-warning:active, -.btn-warning.active, -.btn-warning.disabled, -.btn-warning[disabled] { - background-color: #f89406; -} -.btn-warning:active, .btn-warning.active { - background-color: #c67605 \9; -} -.btn-danger { - background-color: #da4f49; - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(top, #ee5f5b, #bd362f); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0); - border-color: #bd362f #bd362f #802420; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-danger:hover, -.btn-danger:active, -.btn-danger.active, -.btn-danger.disabled, -.btn-danger[disabled] { - background-color: #bd362f; -} -.btn-danger:active, .btn-danger.active { - background-color: #942a25 \9; -} -.btn-success { - background-color: #5bb75b; - background-image: -moz-linear-gradient(top, #62c462, #51a351); - background-image: -ms-linear-gradient(top, #62c462, #51a351); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); - background-image: -webkit-linear-gradient(top, #62c462, #51a351); - background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(top, #62c462, #51a351); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0); - border-color: #51a351 #51a351 #387038; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-success:hover, -.btn-success:active, -.btn-success.active, -.btn-success.disabled, -.btn-success[disabled] { - background-color: #51a351; -} -.btn-success:active, .btn-success.active { - background-color: #408140 \9; -} -.btn-info { - background-color: #49afcd; - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); - background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(top, #5bc0de, #2f96b4); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0); - border-color: #2f96b4 #2f96b4 #1f6377; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-info:hover, -.btn-info:active, -.btn-info.active, -.btn-info.disabled, -.btn-info[disabled] { - background-color: #2f96b4; -} -.btn-info:active, .btn-info.active { - background-color: #24748c \9; -} -button.btn, input[type="submit"].btn { - *padding-top: 2px; - *padding-bottom: 2px; -} -button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner { - padding: 0; - border: 0; -} -button.btn.large, input[type="submit"].btn.large { - *padding-top: 7px; - *padding-bottom: 7px; -} -button.btn.small, input[type="submit"].btn.small { - *padding-top: 3px; - *padding-bottom: 3px; -} -.btn-group { - position: relative; - *zoom: 1; - *margin-left: .3em; -} -.btn-group:before, .btn-group:after { - display: table; - content: ""; -} -.btn-group:after { - clear: both; -} -.btn-group:first-child { - *margin-left: 0; -} -.btn-group + .btn-group { - margin-left: 5px; -} -.btn-toolbar { - margin-top: 9px; - margin-bottom: 9px; -} -.btn-toolbar .btn-group { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} -.btn-group .btn { - position: relative; - float: left; - margin-left: -1px; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.btn-group .btn:first-child { - margin-left: 0; - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; - border-top-left-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-left-radius: 4px; -} -.btn-group .btn:last-child, .btn-group .dropdown-toggle { - -webkit-border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; - border-bottom-right-radius: 4px; -} -.btn-group .btn.large:first-child { - margin-left: 0; - -webkit-border-top-left-radius: 6px; - -moz-border-radius-topleft: 6px; - border-top-left-radius: 6px; - -webkit-border-bottom-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - border-bottom-left-radius: 6px; -} -.btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle { - -webkit-border-top-right-radius: 6px; - -moz-border-radius-topright: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - -moz-border-radius-bottomright: 6px; - border-bottom-right-radius: 6px; -} -.btn-group .btn:hover, -.btn-group .btn:focus, -.btn-group .btn:active, -.btn-group .btn.active { - z-index: 2; -} -.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { - outline: 0; -} -.btn-group .dropdown-toggle { - padding-left: 8px; - padding-right: 8px; - -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - *padding-top: 5px; - *padding-bottom: 5px; -} -.btn-group.open { - *z-index: 1000; -} -.btn-group.open .dropdown-menu { - display: block; - margin-top: 1px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -.btn-group.open .dropdown-toggle { - background-image: none; - -webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} -.btn .caret { - margin-top: 7px; - margin-left: 0; -} -.btn:hover .caret, .open.btn-group .caret { - opacity: 1; - filter: alpha(opacity=100); -} -.btn-primary .caret, -.btn-danger .caret, -.btn-info .caret, -.btn-success .caret { - border-top-color: #ffffff; - opacity: 0.75; - filter: alpha(opacity=75); -} -.btn-small .caret { - margin-top: 4px; -} -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 18px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #fcf8e3; - border: 1px solid #fbeed5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.alert, .alert-heading { - color: #c09853; -} -.alert .close { - position: relative; - top: -2px; - right: -21px; - line-height: 18px; -} -.alert-success { - background-color: #dff0d8; - border-color: #d6e9c6; -} -.alert-success, .alert-success .alert-heading { - color: #468847; -} -.alert-danger, .alert-error { - background-color: #f2dede; - border-color: #eed3d7; -} -.alert-danger, -.alert-error, -.alert-danger .alert-heading, -.alert-error .alert-heading { - color: #b94a48; -} -.alert-info { - background-color: #d9edf7; - border-color: #bce8f1; -} -.alert-info, .alert-info .alert-heading { - color: #3a87ad; -} -.alert-block { - padding-top: 14px; - padding-bottom: 14px; -} -.alert-block > p, .alert-block > ul { - margin-bottom: 0; -} -.alert-block p + p { - margin-top: 5px; -} -.nav { - margin-left: 0; - margin-bottom: 18px; - list-style: none; -} -.nav > li > a { - display: block; -} -.nav > li > a:hover { - text-decoration: none; - background-color: #eeeeee; -} -.nav-list { - padding-left: 14px; - padding-right: 14px; - margin-bottom: 0; -} -.nav-list > li > a, .nav-list .nav-header { - display: block; - padding: 3px 15px; - margin-left: -15px; - margin-right: -15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} -.nav-list .nav-header { - font-size: 11px; - font-weight: bold; - line-height: 18px; - color: #999999; - text-transform: uppercase; -} - -.nav-list .nav-header * { - text-transform:none; -} - -.nav-list > li + .nav-header { - margin-top: 9px; -} -.nav-list .active > a, .nav-list .active > a:hover { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - background-color: #0088cc; -} -.nav-list [class^="icon-"] { - margin-right: 2px; -} -.nav-tabs, .nav-pills { - *zoom: 1; -} -.nav-tabs:before, -.nav-pills:before, -.nav-tabs:after, -.nav-pills:after { - display: table; - content: ""; -} -.nav-tabs:after, .nav-pills:after { - clear: both; -} -.nav-tabs > li, .nav-pills > li { - float: left; -} -.nav-tabs > li > a, .nav-pills > li > a { - padding-right: 12px; - padding-left: 12px; - margin-right: 2px; - line-height: 14px; -} -.nav-tabs { - border-bottom: 1px solid #ddd; -} -.nav-tabs > li { - margin-bottom: -1px; -} -.nav-tabs > li > a { - padding-top: 9px; - padding-bottom: 9px; - border: 1px solid transparent; - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} -.nav-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #dddddd; -} -.nav-tabs > .active > a, .nav-tabs > .active > a:hover { - color: #555555; - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; - cursor: default; -} -.nav-pills > li > a { - padding-top: 8px; - padding-bottom: 8px; - margin-top: 2px; - margin-bottom: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -.nav-pills .active > a, .nav-pills .active > a:hover { - color: #ffffff; - background-color: #0088cc; -} -.nav-stacked > li { - float: none; -} -.nav-stacked > li > a { - margin-right: 0; -} -.nav-tabs.nav-stacked { - border-bottom: 0; -} -.nav-tabs.nav-stacked > li > a { - border: 1px solid #ddd; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.nav-tabs.nav-stacked > li:first-child > a { - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} -.nav-tabs.nav-stacked > li:last-child > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} -.nav-tabs.nav-stacked > li > a:hover { - border-color: #ddd; - z-index: 2; -} -.nav-pills.nav-stacked > li > a { - margin-bottom: 3px; -} -.nav-pills.nav-stacked > li:last-child > a { - margin-bottom: 1px; -} -.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu { - margin-top: 1px; - border-width: 1px; -} -.nav-pills .dropdown-menu { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret { - border-top-color: #0088cc; - margin-top: 6px; -} -.nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret { - border-top-color: #005580; -} -.nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret { - border-top-color: #333333; -} -.nav > .dropdown.active > a:hover { - color: #000000; - cursor: pointer; -} -.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover { - color: #ffffff; - background-color: #999999; - border-color: #999999; -} -.nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret { - border-top-color: #ffffff; - opacity: 1; - filter: alpha(opacity=100); -} -.tabs-stacked .open > a:hover { - border-color: #999999; -} -.tabbable { - *zoom: 1; -} -.tabbable:before, .tabbable:after { - display: table; - content: ""; -} -.tabbable:after { - clear: both; -} -.tabs-below .nav-tabs, .tabs-right .nav-tabs, .tabs-left .nav-tabs { - border-bottom: 0; -} -.tab-content > .tab-pane, .pill-content > .pill-pane { - display: none; -} -.tab-content > .active, .pill-content > .active { - display: block; -} -.tabs-below .nav-tabs { - border-top: 1px solid #ddd; -} -.tabs-below .nav-tabs > li { - margin-top: -1px; - margin-bottom: 0; -} -.tabs-below .nav-tabs > li > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} -.tabs-below .nav-tabs > li > a:hover { - border-bottom-color: transparent; - border-top-color: #ddd; -} -.tabs-below .nav-tabs .active > a, .tabs-below .nav-tabs .active > a:hover { - border-color: transparent #ddd #ddd #ddd; -} -.tabs-left .nav-tabs > li, .tabs-right .nav-tabs > li { - float: none; -} -.tabs-left .nav-tabs > li > a, .tabs-right .nav-tabs > li > a { - min-width: 74px; - margin-right: 0; - margin-bottom: 3px; -} -.tabs-left .nav-tabs { - float: left; - margin-right: 19px; - border-right: 1px solid #ddd; -} -.tabs-left .nav-tabs > li > a { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} -.tabs-left .nav-tabs > li > a:hover { - border-color: #eeeeee #dddddd #eeeeee #eeeeee; -} -.tabs-left .nav-tabs .active > a, .tabs-left .nav-tabs .active > a:hover { - border-color: #ddd transparent #ddd #ddd; - *border-right-color: #ffffff; -} -.tabs-right .nav-tabs { - float: right; - margin-left: 19px; - border-left: 1px solid #ddd; -} -.tabs-right .nav-tabs > li > a { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} -.tabs-right .nav-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #eeeeee #dddddd; -} -.tabs-right .nav-tabs .active > a, .tabs-right .nav-tabs .active > a:hover { - border-color: #ddd #ddd #ddd transparent; - *border-left-color: #ffffff; -} -.navbar { - overflow: visible; - margin-bottom: 18px; -} -.navbar-inner { - padding-left: 20px; - padding-right: 20px; - background-color: #2c2c2c; - background-image: -moz-linear-gradient(top, #333333, #222222); - background-image: -ms-linear-gradient(top, #333333, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); - background-image: -webkit-linear-gradient(top, #333333, #222222); - background-image: -o-linear-gradient(top, #333333, #222222); - background-image: linear-gradient(top, #333333, #222222); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); -} -.btn-navbar { - display: none; - float: right; - padding: 7px 10px; - margin-left: 5px; - margin-right: 5px; - background-color: #2c2c2c; - background-image: -moz-linear-gradient(top, #333333, #222222); - background-image: -ms-linear-gradient(top, #333333, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); - background-image: -webkit-linear-gradient(top, #333333, #222222); - background-image: -o-linear-gradient(top, #333333, #222222); - background-image: linear-gradient(top, #333333, #222222); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -} -.btn-navbar:hover, -.btn-navbar:active, -.btn-navbar.active, -.btn-navbar.disabled, -.btn-navbar[disabled] { - background-color: #222222; -} -.btn-navbar:active, .btn-navbar.active { - background-color: #080808 \9; -} -.btn-navbar .icon-bar { - display: block; - width: 18px; - height: 2px; - background-color: #f5f5f5; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -} -.btn-navbar .icon-bar + .icon-bar { - margin-top: 3px; -} -.nav-collapse.collapse { - height: auto; -} -.navbar .brand:hover { - text-decoration: none; -} -.navbar .brand { - float: left; - display: block; - padding: 8px 20px 12px; - margin-left: -20px; - font-size: 20px; - font-weight: 200; - line-height: 1; - color: #ffffff; -} -.navbar .navbar-text { - margin-bottom: 0; - line-height: 40px; - color: #999999; -} -.navbar .navbar-text a:hover { - color: #ffffff; - background-color: transparent; -} -.navbar .btn, .navbar .btn-group { - margin-top: 5px; -} -.navbar .btn-group .btn { - margin-top: 0; -} -.navbar-form { - margin-bottom: 0; - *zoom: 1; -} -.navbar-form:before, .navbar-form:after { - display: table; - content: ""; -} -.navbar-form:after { - clear: both; -} -.navbar-form input, .navbar-form select { - display: inline-block; - margin-top: 5px; - margin-bottom: 0; -} -.navbar-form .radio, .navbar-form .checkbox { - margin-top: 5px; -} -.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] { - margin-top: 3px; -} -.navbar-search { - position: relative; - float: left; - margin-top: 6px; - margin-bottom: 0; -} -.navbar-search .search-query { - padding: 4px 9px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: normal; - line-height: 1; - color: #ffffff; - color: rgba(255, 255, 255, 0.75); - background: #666; - background: rgba(255, 255, 255, 0.3); - border: 1px solid #111; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15); - -webkit-transition: none; - -moz-transition: none; - -ms-transition: none; - -o-transition: none; - transition: none; -} -.navbar-search .search-query :-moz-placeholder { - color: #eeeeee; -} -.navbar-search .search-query::-webkit-input-placeholder { - color: #eeeeee; -} -.navbar-search .search-query:hover { - color: #ffffff; - background-color: #999999; - background-color: rgba(255, 255, 255, 0.5); -} -.navbar-search .search-query:focus, .navbar-search .search-query.focused { - padding: 5px 10px; - color: #333333; - text-shadow: 0 1px 0 #ffffff; - background-color: #ffffff; - border: 0; - -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - outline: 0; -} -.navbar-fixed-top { - position: fixed; - top: 0; - right: 0; - left: 0; - z-index: 1030; -} -.navbar-fixed-top .navbar-inner { - padding-left: 0; - padding-right: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.navbar .nav { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; -} -.navbar .nav.pull-right { - float: right; -} -.navbar .nav > li { - display: block; - float: left; -} -.navbar .nav > li > a { - float: none; - padding: 10px 10px 11px; - line-height: 19px; - color: #999999; - text-decoration: none; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} -.navbar .nav > li > a:hover { - background-color: transparent; - color: #ffffff; - text-decoration: none; -} -.navbar .nav .active > a, .navbar .nav .active > a:hover { - color: #ffffff; - text-decoration: none; - background-color: #222222; - background-color: rgba(0, 0, 0, 0.5); -} -.navbar .divider-vertical { - height: 40px; - width: 1px; - margin: 0 9px; - overflow: hidden; - background-color: #222222; - border-right: 1px solid #333333; -} -.navbar .nav.pull-right { - margin-left: 10px; - margin-right: 0; -} -.navbar .dropdown-menu { - margin-top: 1px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.navbar .dropdown-menu:before { - content: ''; - display: inline-block; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-bottom-color: rgba(0, 0, 0, 0.2); - position: absolute; - top: -7px; - left: 9px; -} -.navbar .dropdown-menu:after { - content: ''; - display: inline-block; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #ffffff; - position: absolute; - top: -6px; - left: 10px; -} -.navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret { - border-top-color: #ffffff; -} -.navbar .nav .active .caret { - opacity: 1; - filter: alpha(opacity=100); -} -.navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle { - background-color: transparent; -} -.navbar .nav .active > .dropdown-toggle:hover { - color: #ffffff; -} -.navbar .nav.pull-right .dropdown-menu { - left: auto; - right: 0; -} -.navbar .nav.pull-right .dropdown-menu:before { - left: auto; - right: 12px; -} -.navbar .nav.pull-right .dropdown-menu:after { - left: auto; - right: 13px; -} -.breadcrumb { - padding: 7px 14px; - margin: 0 0 18px; - background-color: #fbfbfb; - background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5); - background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5)); - background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5); - background-image: -o-linear-gradient(top, #ffffff, #f5f5f5); - background-image: linear-gradient(top, #ffffff, #f5f5f5); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); - border: 1px solid #ddd; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; -} -.breadcrumb li { - display: inline; - text-shadow: 0 1px 0 #ffffff; -} -.breadcrumb .divider { - padding: 0 5px; - color: #999999; -} -.breadcrumb .active a { - color: #333333; -} -.pagination { - height: 36px; - margin: 18px 0; -} -.pagination ul { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - margin-left: 0; - margin-bottom: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -} -.pagination li { - display: inline; -} -.pagination a { - float: left; - padding: 0 14px; - line-height: 34px; - text-decoration: none; - border: 1px solid #ddd; - border-left-width: 0; -} -.pagination a:hover, .pagination .active a { - background-color: #f5f5f5; -} -.pagination .active a { - color: #999999; - cursor: default; -} -.pagination .disabled a, .pagination .disabled a:hover { - color: #999999; - background-color: transparent; - cursor: default; -} -.pagination li:first-child a { - border-left-width: 1px; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; -} -.pagination li:last-child a { - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; -} -.pagination-centered { - text-align: center; -} -.pagination-right { - text-align: right; -} -.pager { - margin-left: 0; - margin-bottom: 18px; - list-style: none; - text-align: center; - *zoom: 1; -} -.pager:before, .pager:after { - display: table; - content: ""; -} -.pager:after { - clear: both; -} -.pager li { - display: inline; -} -.pager a { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} -.pager a:hover { - text-decoration: none; - background-color: #f5f5f5; -} -.pager .next a { - float: right; -} -.pager .previous a { - float: left; -} -.modal-open .dropdown-menu { - z-index: 2050; -} -.modal-open .dropdown.open { - *z-index: 2050; -} -.modal-open .popover { - z-index: 2060; -} -.modal-open .tooltip { - z-index: 2070; -} -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000000; -} -.modal-backdrop.fade { - opacity: 0; -} -.modal-backdrop, .modal-backdrop.fade.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.modal { - position: fixed; - top: 50%; - left: 50%; - z-index: 1050; - max-height: 500px; - overflow: auto; - width: 560px; - margin: -250px 0 0 -280px; - background-color: #ffffff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.3); - *border: 1px solid #999; - /* IE6-7 */ - - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} -.modal.fade { - -webkit-transition: opacity .3s linear, top .3s ease-out; - -moz-transition: opacity .3s linear, top .3s ease-out; - -ms-transition: opacity .3s linear, top .3s ease-out; - -o-transition: opacity .3s linear, top .3s ease-out; - transition: opacity .3s linear, top .3s ease-out; - top: -25%; -} -.modal.fade.in { - top: 50%; -} -.modal-header { - padding: 9px 15px; - border-bottom: 1px solid #eee; -} -.modal-header .close { - margin-top: 2px; -} -.modal-body { - padding: 15px; -} -.modal-footer { - padding: 14px 15px 15px; - margin-bottom: 0; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; - *zoom: 1; -} -.modal-footer:before, .modal-footer:after { - display: table; - content: ""; -} -.modal-footer:after { - clear: both; -} -.modal-footer .btn { - float: right; - margin-left: 5px; - margin-bottom: 0; -} -.tooltip { - position: absolute; - z-index: 1020; - display: block; - visibility: visible; - padding: 5px; - font-size: 11px; - opacity: 0; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.tooltip.top { - margin-top: -2px; -} -.tooltip.right { - margin-left: 2px; -} -.tooltip.bottom { - margin-top: 2px; -} -.tooltip.left { - margin-left: -2px; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-top: 5px solid #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-top: 5px solid transparent; - border-bottom: 5px solid transparent; - border-left: 5px solid #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-bottom: 5px solid #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-top: 5px solid transparent; - border-bottom: 5px solid transparent; - border-right: 5px solid #000000; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; -} -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - padding: 5px; -} -.popover.top { - margin-top: -5px; -} -.popover.right { - margin-left: 5px; -} -.popover.bottom { - margin-top: 5px; -} -.popover.left { - margin-left: -5px; -} -.popover.top .arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-top: 5px solid #000000; -} -.popover.right .arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-top: 5px solid transparent; - border-bottom: 5px solid transparent; - border-right: 5px solid #000000; -} -.popover.bottom .arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-bottom: 5px solid #000000; -} -.popover.left .arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-top: 5px solid transparent; - border-bottom: 5px solid transparent; - border-left: 5px solid #000000; -} -.popover .arrow { - position: absolute; - width: 0; - height: 0; -} -.popover-inner { - padding: 3px; - width: 280px; - overflow: hidden; - background: #000000; - background: rgba(0, 0, 0, 0.8); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -} -.popover-title { - padding: 9px 15px; - line-height: 1; - background-color: #f5f5f5; - border-bottom: 1px solid #eee; - -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; -} -.popover-content { - padding: 14px; - background-color: #ffffff; - -webkit-border-radius: 0 0 3px 3px; - -moz-border-radius: 0 0 3px 3px; - border-radius: 0 0 3px 3px; - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} -.popover-content p, .popover-content ul, .popover-content ol { - margin-bottom: 0; -} -.thumbnails { - margin-left: -20px; - list-style: none; - *zoom: 1; -} -.thumbnails:before, .thumbnails:after { - display: table; - content: ""; -} -.thumbnails:after { - clear: both; -} -.thumbnails > li { - float: left; - margin: 0 0 18px 20px; -} -.thumbnail { - display: block; - padding: 4px; - line-height: 1; - border: 1px solid #ddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); -} -a.thumbnail:hover { - border-color: #0088cc; - -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -} -.thumbnail > img { - display: block; - max-width: 100%; - margin-left: auto; - margin-right: auto; -} -.thumbnail .caption { - padding: 9px; -} -.label { - padding: 1px 3px 2px; - font-size: 9.75px; - font-weight: bold; - color: #ffffff; - text-transform: uppercase; - background-color: #999999; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.label-important { - background-color: #b94a48; -} -.label-warning { - background-color: #f89406; -} -.label-success { - background-color: #468847; -} -.label-info { - background-color: #3a87ad; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} -@-moz-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} -.progress { - overflow: hidden; - height: 18px; - margin-bottom: 18px; - background-color: #f7f7f7; - background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); - background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: linear-gradient(top, #f5f5f5, #f9f9f9); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0); - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.progress .bar { - width: 0%; - height: 18px; - color: #ffffff; - font-size: 12px; - text-align: center; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e90d2; - background-image: -moz-linear-gradient(top, #149bdf, #0480be); - background-image: -ms-linear-gradient(top, #149bdf, #0480be); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); - background-image: -webkit-linear-gradient(top, #149bdf, #0480be); - background-image: -o-linear-gradient(top, #149bdf, #0480be); - background-image: linear-gradient(top, #149bdf, #0480be); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0); - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: width 0.6s ease; - -moz-transition: width 0.6s ease; - -ms-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} -.progress-striped .bar { - background-color: #62c462; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - -moz-background-size: 40px 40px; - -o-background-size: 40px 40px; - background-size: 40px 40px; -} -.progress.active .bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} -.progress-danger .bar { - background-color: #dd514c; - background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); - background-image: linear-gradient(top, #ee5f5b, #c43c35); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0); -} -.progress-danger.progress-striped .bar { - background-color: #ee5f5b; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-success .bar { - background-color: #5eb95e; - background-image: -moz-linear-gradient(top, #62c462, #57a957); - background-image: -ms-linear-gradient(top, #62c462, #57a957); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); - background-image: -webkit-linear-gradient(top, #62c462, #57a957); - background-image: -o-linear-gradient(top, #62c462, #57a957); - background-image: linear-gradient(top, #62c462, #57a957); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0); -} -.progress-success.progress-striped .bar { - background-color: #62c462; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-info .bar { - background-color: #4bb1cf; - background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); - background-image: -ms-linear-gradient(top, #5bc0de, #339bb9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); - background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); - background-image: -o-linear-gradient(top, #5bc0de, #339bb9); - background-image: linear-gradient(top, #5bc0de, #339bb9); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0); -} -.progress-info.progress-striped .bar { - background-color: #5bc0de; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.accordion { - margin-bottom: 18px; -} -.accordion-group { - margin-bottom: 2px; - border: 1px solid #e5e5e5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.accordion-heading { - border-bottom: 0; -} -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; -} -.accordion-inner { - padding: 9px 15px; - border-top: 1px solid #e5e5e5; -} -.carousel { - position: relative; - margin-bottom: 18px; - line-height: 1; -} -.carousel-inner { - overflow: hidden; - width: 100%; - position: relative; -} -.carousel .item { - display: none; - position: relative; - -webkit-transition: 0.6s ease-in-out left; - -moz-transition: 0.6s ease-in-out left; - -ms-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} -.carousel .item > img { - display: block; - line-height: 1; -} -.carousel .active, .carousel .next, .carousel .prev { - display: block; -} -.carousel .active { - left: 0; -} -.carousel .next, .carousel .prev { - position: absolute; - top: 0; - width: 100%; -} -.carousel .next { - left: 100%; -} -.carousel .prev { - left: -100%; -} -.carousel .next.left, .carousel .prev.right { - left: 0; -} -.carousel .active.left { - left: -100%; -} -.carousel .active.right { - left: 100%; -} -.carousel-control { - position: absolute; - top: 40%; - left: 15px; - width: 40px; - height: 40px; - margin-top: -20px; - font-size: 60px; - font-weight: 100; - line-height: 30px; - color: #ffffff; - text-align: center; - background: #222222; - border: 3px solid #ffffff; - -webkit-border-radius: 23px; - -moz-border-radius: 23px; - border-radius: 23px; - opacity: 0.5; - filter: alpha(opacity=50); -} -.carousel-control.right { - left: auto; - right: 15px; -} -.carousel-control:hover { - color: #ffffff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} -.carousel-caption { - position: absolute; - left: 0; - right: 0; - bottom: 0; - padding: 10px 15px 5px; - background: #333333; - background: rgba(0, 0, 0, 0.75); -} -.carousel-caption h4, .carousel-caption p { - color: #ffffff; -} -.hero-unit { - padding: 60px; - margin-bottom: 30px; - background-color: #f5f5f5; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.hero-unit h1 { - margin-bottom: 0; - font-size: 60px; - line-height: 1; - letter-spacing: -1px; -} -.hero-unit p { - font-size: 18px; - font-weight: 200; - line-height: 27px; -} -.pull-right { - float: right; -} -.pull-left { - float: left; -} -.hide { - display: none; -} -.show { - display: block; -} -.invisible { - visibility: hidden; -} diff --git a/docs/css/bootstrap.min.css b/docs/css/bootstrap.min.css deleted file mode 100644 index d522124..0000000 --- a/docs/css/bootstrap.min.css +++ /dev/null @@ -1,611 +0,0 @@ -article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} -audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} -audio:not([controls]){display:none;} -html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} -a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} -a:hover,a:active{outline:0;} -sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} -sup{top:-0.5em;} -sub{bottom:-0.25em;} -img{max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic;} -button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} -button,input{*overflow:visible;line-height:normal;} -button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} -button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} -input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;} -input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} -textarea{overflow:auto;vertical-align:top;} -body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;} -a{color:#0088cc;text-decoration:none;} -a:hover{color:#005580;text-decoration:underline;} -.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} -.row:after{clear:both;} -[class*="span"]{float:left;margin-left:20px;} -.span1{width:60px;} -.span2{width:140px;} -.span3{width:220px;} -.span4{width:300px;} -.span5{width:380px;} -.span6{width:460px;} -.span7{width:540px;} -.span8{width:620px;} -.span9{width:700px;} -.span10{width:780px;} -.span11{width:860px;} -.span12,.container{width:940px;} -.offset1{margin-left:100px;} -.offset2{margin-left:180px;} -.offset3{margin-left:260px;} -.offset4{margin-left:340px;} -.offset5{margin-left:420px;} -.offset6{margin-left:500px;} -.offset7{margin-left:580px;} -.offset8{margin-left:660px;} -.offset9{margin-left:740px;} -.offset10{margin-left:820px;} -.offset11{margin-left:900px;} -.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} -.row-fluid:after{clear:both;} -.row-fluid>[class*="span"]{float:left;margin-left:2.127659574%;} -.row-fluid>[class*="span"]:first-child{margin-left:0;} -.row-fluid .span1{width:6.382978723%;} -.row-fluid .span2{width:14.89361702%;} -.row-fluid .span3{width:23.404255317%;} -.row-fluid .span4{width:31.914893614%;} -.row-fluid .span5{width:40.425531911%;} -.row-fluid .span6{width:48.93617020799999%;} -.row-fluid .span7{width:57.446808505%;} -.row-fluid .span8{width:65.95744680199999%;} -.row-fluid .span9{width:74.468085099%;} -.row-fluid .span10{width:82.97872339599999%;} -.row-fluid .span11{width:91.489361693%;} -.row-fluid .span12{width:99.99999998999999%;} -.container{width:940px;margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";} -.container:after{clear:both;} -.container-fluid{padding-left:20px;padding-right:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";} -.container-fluid:after{clear:both;} -p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;} -.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;} -h1,h2,h3,h4,h5,h6{margin:0;font-weight:bold;color:#333333;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;} -h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;} -h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;} -h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;} -h4,h5,h6{line-height:18px;} -h4{font-size:14px;}h4 small{font-size:12px;} -h5{font-size:12px;} -h6{font-size:11px;color:#999999;text-transform:uppercase;} -.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;} -.page-header h1{line-height:1;} -ul,ol{padding:0;margin:0 0 9px 25px;} -ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} -ul{list-style:disc;} -ol{list-style:decimal;} -li{line-height:18px;} -ul.unstyled{margin-left:0;list-style:none;} -dl{margin-bottom:18px;} -dt,dd{line-height:18px;} -dt{font-weight:bold;} -dd{margin-left:9px;} -hr{margin:18px 0;border:0;border-top:1px solid #e5e5e5;border-bottom:1px solid #ffffff;} -strong{font-weight:bold;} -em{font-style:italic;} -.muted{color:#999999;} -abbr{font-size:90%;text-transform:uppercase;border-bottom:1px dotted #ddd;cursor:help;} -blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;} -blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';} -blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eeeeee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;} -q:before,q:after,blockquote:before,blockquote:after{content:"";} -address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;} -small{font-size:100%;} -cite{font-style:normal;} -code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} -code{padding:3px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;} -pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;}pre.prettyprint{margin-bottom:18px;} -pre code{padding:0;background-color:transparent;} -form{margin:0 0 18px;} -fieldset{padding:0;margin:0;border:0;} -legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;} -label,input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;} -label{display:block;margin-bottom:5px;color:#333333;} -input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} -.uneditable-textarea{width:auto;height:auto;} -label input,label textarea,label select{display:block;} -input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:0;cursor:pointer;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -input[type="file"]{padding:initial;line-height:initial;border:initial;background-color:#ffffff;background-color:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} -input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;} -select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;} -select{width:220px;background-color:#ffffff;} -select[multiple],select[size]{height:auto;} -input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} -textarea{height:auto;} -input[type="hidden"]{display:none;} -.radio,.checkbox{padding-left:18px;} -.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;} -.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;} -.radio.inline,.checkbox.inline{display:inline-block;margin-bottom:0;vertical-align:middle;} -.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;} -.controls>.radio.inline:first-child,.controls>.checkbox.inline:first-child{padding-top:0;} -input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;} -input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);outline:0;outline:thin dotted \9;} -input[type="file"]:focus,input[type="checkbox"]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} -.input-mini{width:60px;} -.input-small{width:90px;} -.input-medium{width:150px;} -.input-large{width:210px;} -.input-xlarge{width:270px;} -.input-xxlarge{width:530px;} -input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{float:none;margin-left:0;} -input.span1,textarea.span1,.uneditable-input.span1{width:50px;} -input.span2,textarea.span2,.uneditable-input.span2{width:130px;} -input.span3,textarea.span3,.uneditable-input.span3{width:210px;} -input.span4,textarea.span4,.uneditable-input.span4{width:290px;} -input.span5,textarea.span5,.uneditable-input.span5{width:370px;} -input.span6,textarea.span6,.uneditable-input.span6{width:450px;} -input.span7,textarea.span7,.uneditable-input.span7{width:530px;} -input.span8,textarea.span8,.uneditable-input.span8{width:610px;} -input.span9,textarea.span9,.uneditable-input.span9{width:690px;} -input.span10,textarea.span10,.uneditable-input.span10{width:770px;} -input.span11,textarea.span11,.uneditable-input.span11{width:850px;} -input.span12,textarea.span12,.uneditable-input.span12{width:930px;} -input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;} -.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;} -.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;} -.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;} -.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;} -.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;} -.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;} -.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;} -.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;} -.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;} -input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} -.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;} -.uneditable-input{display:block;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;} -:-moz-placeholder{color:#999999;} -::-webkit-input-placeholder{color:#999999;} -.help-block{margin-top:5px;margin-bottom:0;color:#999999;} -.help-inline{display:inline-block;*display:inline;*zoom:1;margin-bottom:9px;vertical-align:middle;padding-left:5px;} -.input-prepend,.input-append{margin-bottom:5px;*zoom:1;}.input-prepend:before,.input-append:before,.input-prepend:after,.input-append:after{display:table;content:"";} -.input-prepend:after,.input-append:after{clear:both;} -.input-prepend input,.input-append input,.input-prepend .uneditable-input,.input-append .uneditable-input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{position:relative;z-index:2;} -.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;} -.input-prepend .add-on,.input-append .add-on{float:left;display:block;width:auto;min-width:16px;height:18px;margin-right:-1px;padding:4px 5px;font-weight:normal;line-height:18px;color:#999999;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#f5f5f5;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} -.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;} -.input-prepend .add-on{*margin-top:1px;} -.input-append input,.input-append .uneditable-input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} -.input-append .uneditable-input{border-right-color:#ccc;} -.input-append .add-on{margin-right:0;margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} -.input-append input:first-child{*margin-left:-160px;}.input-append input:first-child+.add-on{*margin-left:-21px;} -.search-query{padding-left:14px;padding-right:14px;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;} -.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input{display:inline-block;margin-bottom:0;} -.form-search label,.form-inline label,.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{display:inline-block;} -.form-search .input-append .add-on,.form-inline .input-prepend .add-on,.form-search .input-append .add-on,.form-inline .input-prepend .add-on{vertical-align:middle;} -.control-group{margin-bottom:9px;} -.form-horizontal legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;} -.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";} -.form-horizontal .control-group:after{clear:both;} -.form-horizontal .control-group>label{float:left;width:140px;padding-top:5px;text-align:right;} -.form-horizontal .controls{margin-left:160px;} -.form-horizontal .form-actions{padding-left:160px;} -table{max-width:100%;border-collapse:collapse;border-spacing:0;} -.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;border-top:1px solid #ddd;} -.table th{font-weight:bold;vertical-align:bottom;} -.table td{vertical-align:top;} -.table thead:first-child tr th,.table thead:first-child tr td{border-top:0;} -.table tbody+tbody{border-top:2px solid #ddd;} -.table-condensed th,.table-condensed td{padding:4px 5px;} -.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th+th,.table-bordered td+td,.table-bordered th+td,.table-bordered td+th{border-left:1px solid #ddd;} -.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} -.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;} -.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} -.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} -.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;} -.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} -table .span1{float:none;width:44px;margin-left:0;} -table .span2{float:none;width:124px;margin-left:0;} -table .span3{float:none;width:204px;margin-left:0;} -table .span4{float:none;width:284px;margin-left:0;} -table .span5{float:none;width:364px;margin-left:0;} -table .span6{float:none;width:444px;margin-left:0;} -table .span7{float:none;width:524px;margin-left:0;} -table .span8{float:none;width:604px;margin-left:0;} -table .span9{float:none;width:684px;margin-left:0;} -table .span10{float:none;width:764px;margin-left:0;} -table .span11{float:none;width:844px;margin-left:0;} -table .span12{float:none;width:924px;margin-left:0;} -[class^="icon-"]{display:inline-block;width:14px;height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}[class^="icon-"]:last-child{*margin-left:0;} -.icon-white{background-image:url(../img/glyphicons-halflings-white.png);} -.icon-glass{background-position:0 0;} -.icon-music{background-position:-24px 0;} -.icon-search{background-position:-48px 0;} -.icon-envelope{background-position:-72px 0;} -.icon-heart{background-position:-96px 0;} -.icon-star{background-position:-120px 0;} -.icon-star-empty{background-position:-144px 0;} -.icon-user{background-position:-168px 0;} -.icon-film{background-position:-192px 0;} -.icon-th-large{background-position:-216px 0;} -.icon-th{background-position:-240px 0;} -.icon-th-list{background-position:-264px 0;} -.icon-ok{background-position:-288px 0;} -.icon-remove{background-position:-312px 0;} -.icon-zoom-in{background-position:-336px 0;} -.icon-zoom-out{background-position:-360px 0;} -.icon-off{background-position:-384px 0;} -.icon-signal{background-position:-408px 0;} -.icon-cog{background-position:-432px 0;} -.icon-trash{background-position:-456px 0;} -.icon-home{background-position:0 -24px;} -.icon-file{background-position:-24px -24px;} -.icon-time{background-position:-48px -24px;} -.icon-road{background-position:-72px -24px;} -.icon-download-alt{background-position:-96px -24px;} -.icon-download{background-position:-120px -24px;} -.icon-upload{background-position:-144px -24px;} -.icon-inbox{background-position:-168px -24px;} -.icon-play-circle{background-position:-192px -24px;} -.icon-repeat{background-position:-216px -24px;} -.icon-refresh{background-position:-240px -24px;} -.icon-list-alt{background-position:-264px -24px;} -.icon-lock{background-position:-287px -24px;} -.icon-flag{background-position:-312px -24px;} -.icon-headphones{background-position:-336px -24px;} -.icon-volume-off{background-position:-360px -24px;} -.icon-volume-down{background-position:-384px -24px;} -.icon-volume-up{background-position:-408px -24px;} -.icon-qrcode{background-position:-432px -24px;} -.icon-barcode{background-position:-456px -24px;} -.icon-tag{background-position:0 -48px;} -.icon-tags{background-position:-25px -48px;} -.icon-book{background-position:-48px -48px;} -.icon-bookmark{background-position:-72px -48px;} -.icon-print{background-position:-96px -48px;} -.icon-camera{background-position:-120px -48px;} -.icon-font{background-position:-144px -48px;} -.icon-bold{background-position:-167px -48px;} -.icon-italic{background-position:-192px -48px;} -.icon-text-height{background-position:-216px -48px;} -.icon-text-width{background-position:-240px -48px;} -.icon-align-left{background-position:-264px -48px;} -.icon-align-center{background-position:-288px -48px;} -.icon-align-right{background-position:-312px -48px;} -.icon-align-justify{background-position:-336px -48px;} -.icon-list{background-position:-360px -48px;} -.icon-indent-left{background-position:-384px -48px;} -.icon-indent-right{background-position:-408px -48px;} -.icon-facetime-video{background-position:-432px -48px;} -.icon-picture{background-position:-456px -48px;} -.icon-pencil{background-position:0 -72px;} -.icon-map-marker{background-position:-24px -72px;} -.icon-adjust{background-position:-48px -72px;} -.icon-tint{background-position:-72px -72px;} -.icon-edit{background-position:-96px -72px;} -.icon-share{background-position:-120px -72px;} -.icon-check{background-position:-144px -72px;} -.icon-move{background-position:-168px -72px;} -.icon-step-backward{background-position:-192px -72px;} -.icon-fast-backward{background-position:-216px -72px;} -.icon-backward{background-position:-240px -72px;} -.icon-play{background-position:-264px -72px;} -.icon-pause{background-position:-288px -72px;} -.icon-stop{background-position:-312px -72px;} -.icon-forward{background-position:-336px -72px;} -.icon-fast-forward{background-position:-360px -72px;} -.icon-step-forward{background-position:-384px -72px;} -.icon-eject{background-position:-408px -72px;} -.icon-chevron-left{background-position:-432px -72px;} -.icon-chevron-right{background-position:-456px -72px;} -.icon-plus-sign{background-position:0 -96px;} -.icon-minus-sign{background-position:-24px -96px;} -.icon-remove-sign{background-position:-48px -96px;} -.icon-ok-sign{background-position:-72px -96px;} -.icon-question-sign{background-position:-96px -96px;} -.icon-info-sign{background-position:-120px -96px;} -.icon-screenshot{background-position:-144px -96px;} -.icon-remove-circle{background-position:-168px -96px;} -.icon-ok-circle{background-position:-192px -96px;} -.icon-ban-circle{background-position:-216px -96px;} -.icon-arrow-left{background-position:-240px -96px;} -.icon-arrow-right{background-position:-264px -96px;} -.icon-arrow-up{background-position:-289px -96px;} -.icon-arrow-down{background-position:-312px -96px;} -.icon-share-alt{background-position:-336px -96px;} -.icon-resize-full{background-position:-360px -96px;} -.icon-resize-small{background-position:-384px -96px;} -.icon-plus{background-position:-408px -96px;} -.icon-minus{background-position:-433px -96px;} -.icon-asterisk{background-position:-456px -96px;} -.icon-exclamation-sign{background-position:0 -120px;} -.icon-gift{background-position:-24px -120px;} -.icon-leaf{background-position:-48px -120px;} -.icon-fire{background-position:-72px -120px;} -.icon-eye-open{background-position:-96px -120px;} -.icon-eye-close{background-position:-120px -120px;} -.icon-warning-sign{background-position:-144px -120px;} -.icon-plane{background-position:-168px -120px;} -.icon-calendar{background-position:-192px -120px;} -.icon-random{background-position:-216px -120px;} -.icon-comment{background-position:-240px -120px;} -.icon-magnet{background-position:-264px -120px;} -.icon-chevron-up{background-position:-288px -120px;} -.icon-chevron-down{background-position:-313px -119px;} -.icon-retweet{background-position:-336px -120px;} -.icon-shopping-cart{background-position:-360px -120px;} -.icon-folder-close{background-position:-384px -120px;} -.icon-folder-open{background-position:-408px -120px;} -.icon-resize-vertical{background-position:-432px -119px;} -.icon-resize-horizontal{background-position:-456px -118px;} -.dropdown{position:relative;} -.dropdown-toggle{*margin-bottom:-3px;} -.dropdown-toggle:active,.open .dropdown-toggle{outline:0;} -.caret{display:inline-block;width:0;height:0;text-indent:-99999px;*text-indent:0;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000000;opacity:0.3;filter:alpha(opacity=30);content:"\2193";} -.dropdown .caret{margin-top:8px;margin-left:2px;} -.dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100);} -.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;max-width:220px;_width:160px;padding:4px 0;margin:0;list-style:none;background-color:#ffffff;border-color:#ccc;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;}.dropdown-menu.bottom-up{top:auto;bottom:100%;margin-bottom:2px;} -.dropdown-menu .divider{height:1px;margin:5px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;} -.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#555555;white-space:nowrap;} -.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;} -.dropdown.open{*z-index:1000;}.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);} -.dropdown.open .dropdown-menu{display:block;} -.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} -.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;} -.collapse{-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;position:relative;overflow:hidden;height:0;}.collapse.in{height:auto;} -.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;opacity:0.4;filter:alpha(opacity=40);cursor:pointer;} -.btn{display:inline-block;padding:4px 10px 4px;font-size:13px;line-height:18px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#fafafa;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);cursor:pointer;*margin-left:.3em;}.btn:first-child{*margin-left:0;} -.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;} -.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} -.btn.active,.btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;color:rgba(0, 0, 0, 0.5);outline:0;} -.btn.disabled,.btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} -.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} -.btn-large .icon{margin-top:1px;} -.btn-small{padding:5px 9px;font-size:11px;line-height:16px;} -.btn-small .icon{margin-top:-1px;} -.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover{text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);color:#ffffff;} -.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active{color:rgba(255, 255, 255, 0.75);} -.btn-primary{background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-ms-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(top, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0044cc;} -.btn-primary:active,.btn-primary.active{background-color:#003399 \9;} -.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;} -.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;} -.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;} -.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;} -.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;} -.btn-success:active,.btn-success.active{background-color:#408140 \9;} -.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;} -.btn-info:active,.btn-info.active{background-color:#24748c \9;} -button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} -button.btn.large,input[type="submit"].btn.large{*padding-top:7px;*padding-bottom:7px;} -button.btn.small,input[type="submit"].btn.small{*padding-top:3px;*padding-bottom:3px;} -.btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";} -.btn-group:after{clear:both;} -.btn-group:first-child{*margin-left:0;} -.btn-group+.btn-group{margin-left:5px;} -.btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;} -.btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -.btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} -.btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} -.btn-group .btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} -.btn-group .btn.large:last-child,.btn-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} -.btn-group .btn:hover,.btn-group .btn:focus,.btn-group .btn:active,.btn-group .btn.active{z-index:2;} -.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;} -.btn-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);*padding-top:5px;*padding-bottom:5px;} -.btn-group.open{*z-index:1000;}.btn-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} -.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);} -.btn .caret{margin-top:7px;margin-left:0;} -.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);} -.btn-primary .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret{border-top-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);} -.btn-small .caret{margin-top:4px;} -.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.alert,.alert-heading{color:#c09853;} -.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;} -.alert-success{background-color:#dff0d8;border-color:#d6e9c6;} -.alert-success,.alert-success .alert-heading{color:#468847;} -.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;} -.alert-danger,.alert-error,.alert-danger .alert-heading,.alert-error .alert-heading{color:#b94a48;} -.alert-info{background-color:#d9edf7;border-color:#bce8f1;} -.alert-info,.alert-info .alert-heading{color:#3a87ad;} -.alert-block{padding-top:14px;padding-bottom:14px;} -.alert-block>p,.alert-block>ul{margin-bottom:0;} -.alert-block p+p{margin-top:5px;} -.nav{margin-left:0;margin-bottom:18px;list-style:none;} -.nav>li>a{display:block;} -.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;} -.nav-list{padding-left:14px;padding-right:14px;margin-bottom:0;} -.nav-list>li>a,.nav-list .nav-header{display:block;padding:3px 15px;margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} -.nav-list .nav-header{font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-transform:uppercase;} -.nav-list .nav-header *{text-transform:none;} -.nav-list>li+.nav-header{margin-top:9px;} -.nav-list .active>a,.nav-list .active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;} -.nav-list [class^="icon-"]{margin-right:2px;} -.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";} -.nav-tabs:after,.nav-pills:after{clear:both;} -.nav-tabs>li,.nav-pills>li{float:left;} -.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;} -.nav-tabs{border-bottom:1px solid #ddd;} -.nav-tabs>li{margin-bottom:-1px;} -.nav-tabs>li>a{padding-top:9px;padding-bottom:9px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;} -.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;} -.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} -.nav-pills .active>a,.nav-pills .active>a:hover{color:#ffffff;background-color:#0088cc;} -.nav-stacked>li{float:none;} -.nav-stacked>li>a{margin-right:0;} -.nav-tabs.nav-stacked{border-bottom:0;} -.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;} -.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;} -.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;} -.nav-pills.nav-stacked>li>a{margin-bottom:3px;} -.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;} -.nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px;} -.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;margin-top:6px;} -.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;} -.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;} -.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;} -.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;} -.nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#ffffff;opacity:1;filter:alpha(opacity=100);} -.tabs-stacked .open>a:hover{border-color:#999999;} -.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";} -.tabbable:after{clear:both;} -.tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0;} -.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;} -.tab-content>.active,.pill-content>.active{display:block;} -.tabs-below .nav-tabs{border-top:1px solid #ddd;} -.tabs-below .nav-tabs>li{margin-top:-1px;margin-bottom:0;} -.tabs-below .nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below .nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;} -.tabs-below .nav-tabs .active>a,.tabs-below .nav-tabs .active>a:hover{border-color:transparent #ddd #ddd #ddd;} -.tabs-left .nav-tabs>li,.tabs-right .nav-tabs>li{float:none;} -.tabs-left .nav-tabs>li>a,.tabs-right .nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;} -.tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;} -.tabs-left .nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} -.tabs-left .nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;} -.tabs-left .nav-tabs .active>a,.tabs-left .nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;} -.tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;} -.tabs-right .nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} -.tabs-right .nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;} -.tabs-right .nav-tabs .active>a,.tabs-right .nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;} -.navbar{overflow:visible;margin-bottom:18px;} -.navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);} -.btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222222;} -.btn-navbar:active,.btn-navbar.active{background-color:#080808 \9;} -.btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);} -.btn-navbar .icon-bar+.icon-bar{margin-top:3px;} -.nav-collapse.collapse{height:auto;} -.navbar .brand:hover{text-decoration:none;} -.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;} -.navbar .navbar-text{margin-bottom:0;line-height:40px;color:#999999;}.navbar .navbar-text a:hover{color:#ffffff;background-color:transparent;} -.navbar .btn,.navbar .btn-group{margin-top:5px;} -.navbar .btn-group .btn{margin-top:0;} -.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";} -.navbar-form:after{clear:both;} -.navbar-form input,.navbar-form select{display:inline-block;margin-top:5px;margin-bottom:0;} -.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;} -.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;} -.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;color:rgba(255, 255, 255, 0.75);background:#666;background:rgba(255, 255, 255, 0.3);border:1px solid #111;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query :-moz-placeholder{color:#eeeeee;} -.navbar-search .search-query::-webkit-input-placeholder{color:#eeeeee;} -.navbar-search .search-query:hover{color:#ffffff;background-color:#999999;background-color:rgba(255, 255, 255, 0.5);} -.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;} -.navbar-fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030;} -.navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} -.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;} -.navbar .nav.pull-right{float:right;} -.navbar .nav>li{display:block;float:left;} -.navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} -.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;} -.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;background-color:rgba(0, 0, 0, 0.5);} -.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;} -.navbar .nav.pull-right{margin-left:10px;margin-right:0;} -.navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;} -.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;} -.navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ffffff;} -.navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100);} -.navbar .nav .open>.dropdown-toggle,.navbar .nav .active>.dropdown-toggle,.navbar .nav .open.active>.dropdown-toggle{background-color:transparent;} -.navbar .nav .active>.dropdown-toggle:hover{color:#ffffff;} -.navbar .nav.pull-right .dropdown-menu{left:auto;right:0;}.navbar .nav.pull-right .dropdown-menu:before{left:auto;right:12px;} -.navbar .nav.pull-right .dropdown-menu:after{left:auto;right:13px;} -.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;} -.breadcrumb .divider{padding:0 5px;color:#999999;} -.breadcrumb .active a{color:#333333;} -.pagination{height:36px;margin:18px 0;} -.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} -.pagination li{display:inline;} -.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;} -.pagination a:hover,.pagination .active a{background-color:#f5f5f5;} -.pagination .active a{color:#999999;cursor:default;} -.pagination .disabled a,.pagination .disabled a:hover{color:#999999;background-color:transparent;cursor:default;} -.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} -.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} -.pagination-centered{text-align:center;} -.pagination-right{text-align:right;} -.pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";} -.pager:after{clear:both;} -.pager li{display:inline;} -.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} -.pager a:hover{text-decoration:none;background-color:#f5f5f5;} -.pager .next a{float:right;} -.pager .previous a{float:left;} -.modal-open .dropdown-menu{z-index:2050;} -.modal-open .dropdown.open{*z-index:2050;} -.modal-open .popover{z-index:2060;} -.modal-open .tooltip{z-index:2070;} -.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;} -.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);} -.modal{position:fixed;top:50%;left:50%;z-index:1050;max-height:500px;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;} -.modal.fade.in{top:50%;} -.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;} -.modal-body{padding:15px;} -.modal-footer{padding:14px 15px 15px;margin-bottom:0;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";} -.modal-footer:after{clear:both;} -.modal-footer .btn{float:right;margin-left:5px;margin-bottom:0;} -.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);} -.tooltip.top{margin-top:-2px;} -.tooltip.right{margin-left:2px;} -.tooltip.bottom{margin-top:2px;} -.tooltip.left{margin-left:-2px;} -.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} -.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} -.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} -.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} -.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.tooltip-arrow{position:absolute;width:0;height:0;} -.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;}.popover.top{margin-top:-5px;} -.popover.right{margin-left:5px;} -.popover.bottom{margin-top:5px;} -.popover.left{margin-left:-5px;} -.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} -.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} -.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} -.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} -.popover .arrow{position:absolute;width:0;height:0;} -.popover-inner{padding:3px;width:280px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);} -.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;} -.popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;} -.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";} -.thumbnails:after{clear:both;} -.thumbnails>li{float:left;margin:0 0 18px 20px;} -.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);} -a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} -.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;} -.thumbnail .caption{padding:9px;} -.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;background-color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} -.label-important{background-color:#b94a48;} -.label-warning{background-color:#f89406;} -.label-success{background-color:#468847;} -.label-info{background-color:#3a87ad;} -@-webkit-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.progress .bar{width:0%;height:18px;color:#ffffff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;} -.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;} -.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;} -.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);} -.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} -.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);} -.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} -.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);} -.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} -.accordion{margin-bottom:18px;} -.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.accordion-heading{border-bottom:0;} -.accordion-heading .accordion-toggle{display:block;padding:8px 15px;} -.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;} -.carousel{position:relative;margin-bottom:18px;line-height:1;} -.carousel-inner{overflow:hidden;width:100%;position:relative;} -.carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;} -.carousel .item>img{display:block;line-height:1;} -.carousel .active,.carousel .next,.carousel .prev{display:block;} -.carousel .active{left:0;} -.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;} -.carousel .next{left:100%;} -.carousel .prev{left:-100%;} -.carousel .next.left,.carousel .prev.right{left:0;} -.carousel .active.left{left:-100%;} -.carousel .active.right{left:100%;} -.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;} -.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);} -.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);} -.carousel-caption h4,.carousel-caption p{color:#ffffff;} -.hero-unit{padding:60px;margin-bottom:30px;background-color:#f5f5f5;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;} -.hero-unit p{font-size:18px;font-weight:200;line-height:27px;} -.pull-right{float:right;} -.pull-left{float:left;} -.hide{display:none;} -.show{display:block;} -.invisible{visibility:hidden;} diff --git a/docs/css/jquery.iviewer.css b/docs/css/jquery.iviewer.css deleted file mode 100644 index d68c642..0000000 --- a/docs/css/jquery.iviewer.css +++ /dev/null @@ -1,91 +0,0 @@ -.iviewer_common { - position:absolute; - bottom:10px; - border: 1px solid #000; - height: 28px; - z-index: 5000; -} - -.iviewer_cursor { - cursor: url(../img/iviewer/hand.cur) 6 8, pointer; -} - -.iviewer_drag_cursor { - cursor: url(../img/iviewer/grab.cur) 6 8, pointer; -} - -.iviewer_button { - width: 28px; - cursor: pointer; - background-position: center center; - background-repeat: no-repeat; -} - -.iviewer_zoom_in { - left: 20px; - background: url(../img/iviewer/iviewer.zoom_in.png); -} - -.iviewer_zoom_out { - left: 55px; - background: url(../img/iviewer/iviewer.zoom_out.png); -} - -.iviewer_zoom_zero { - left: 90px; - background: url(../img/iviewer/iviewer.zoom_zero.png); -} - -.iviewer_zoom_fit { - left: 125px; - background: url(../img/iviewer/iviewer.zoom_fit.png); -} - -.iviewer_zoom_status { - left: 160px; - font: 1em/28px Sans; - color: #000; - background-color: #fff; - text-align: center; - width: 60px; -} - -.iviewer_rotate_left { - left: 227px; - background: #fff url(../img/iviewer/iviewer.rotate_left.png) center center no-repeat; -} - -.iviewer_rotate_right { - left: 262px; - background: #fff url(../img/iviewer/iviewer.rotate_right.png) center center no-repeat; -} - -.viewer -{ - width: 100%; - height: 500px; - position: relative; - background: transparent url('../img/loader.gif') no-repeat center center; -} - -.viewer img -{ - max-width: none; -} - -.wrapper -{ - overflow: hidden; -} - -.iviewer_common -{ - border: 0; - bottom: auto; - top: 10px; -} - -.iviewer_zoom_status -{ - border: 1px solid black; -} diff --git a/docs/css/prettify.css b/docs/css/prettify.css deleted file mode 100644 index d44b3a2..0000000 --- a/docs/css/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/docs/css/template.css b/docs/css/template.css deleted file mode 100644 index 12a7a69..0000000 --- a/docs/css/template.css +++ /dev/null @@ -1,530 +0,0 @@ -@import url(bootstrap.min.css); -@import url(bootstrap-responsive.css); -@import url(prettify.css); -@import url(jquery.iviewer.css); -@import url(https://fonts.googleapis.com/css?family=Forum); - -body -{ - padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ - background: #f9f9f9; - color: #444; -} - -a -{ - color: #55A72F; -} - -td p:last-of-type { - margin: 0; -} - -li.l0, li.l1, li.l2, li.l3, li.l5, li.l6, li.l7, li.l8 -{ - list-style-type: decimal; -} - -a.brand, h2, .hero-unit h1 -{ - font-family: 'Forum', "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -.element .span4 -{ - width: 275px; -} - -.namespace-contents hr, .package-contents hr -{ - border-top: 3px dotted silver; -} - -.namespace-indent, .package-indent -{ - padding-left: 10px; border-left: 1px dashed #f0f0f0; -} - -.element h3 i, .namespace-contents h3 i, .package-contents h3 i -{ - margin-top: 2px; - margin-right: 5px; -} - -.element h3, .namespace-contents h3, .package-contents h3 -{ - margin-top: 25px; - margin-bottom: 20px; - border-bottom: 1px solid silver; -} - -.element h3:first-of-type, .namespace-contents h3:first-of-type, -.package-contents h3:first-of-type -{ - margin-top: 30px; -} - -.element h2 -{ - font-family: inherit; - font-size: 1.2em; - color: black; -} - -.element .type -{ - font-weight: bold; -} - -#search-query -{ - height: auto; -} - -.hero-unit, div.element, .well -{ - border: 1px solid #e0e0e0; - background: white; -} - -.dropdown-menu a{ - overflow: hidden; - text-overflow: ellipsis; -} -h2 -{ - border-bottom: 1px dashed #55A72F; - margin-bottom: 10px; - padding-bottom: 0; - padding-left: 5px; - color: #e9e9e9; - font-weight: normal; - margin-top: 40px; -} - -h2:first-of-type -{ - margin-top: 0; -} - -.hero-unit -{ - background: #75a70d; /* Old browsers */ - background: -moz-radial-gradient(center, ellipse cover, #bfd255 0%, #8eb92a 72%, #72aa00 96%, #9ecb2d 100%); /* FF3.6+ */ - background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#bfd255), color-stop(72%,#8eb92a), color-stop(96%,#72aa00), color-stop(100%,#9ecb2d)); /* Chrome,Safari4+ */ - background: -webkit-radial-gradient(center, ellipse cover, #bfd255 0%,#8eb92a 72%,#72aa00 96%,#9ecb2d 100%); /* Chrome10+,Safari5.1+ */ - background: -o-radial-gradient(center, ellipse cover, #bfd255 0%,#8eb92a 72%,#72aa00 96%,#9ecb2d 100%); /* Opera 12+ */ - background: -ms-radial-gradient(center, ellipse cover, #bfd255 0%,#8eb92a 72%,#72aa00 96%,#9ecb2d 100%); /* IE10+ */ - background: radial-gradient(center, ellipse cover, #bfd255 0%,#8eb92a 72%,#72aa00 96%,#9ecb2d 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bfd255', endColorstr='#9ecb2d',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ - - padding: 40px 0 15px 0; - box-shadow: inset 0 0 10px gray; -} - -.hero-unit h1 -{ - font-weight: normal; - text-align: center; - color: white; - text-shadow: black 0 0 15px; -} - -.hero-unit h2 -{ - border: none; - color: white; - background: rgba(48, 48, 48, 0.5); - padding: 0; - margin: 0; - margin-top: 15px; - text-align: center; -} - -.namespace-contents h2, .package-contents h2 -{ - padding-left: 44px; - background: transparent url('../img/icons/icon-th-big.png') no-repeat 3px center; -} - -.package-contents h2 -{ - background-image: url('../img/icons/icon-folder-open-big.png'); -} - -.namespace-contents .element h2, .package-contents .element h2 -{ - padding-left: 0; - background: none; -} - -div.element -{ - border-left: 10px solid #55A72F; - border-radius: 5px; - padding: 7px 7px 2px 7px; - margin-bottom: 15px; - margin-left: 0; -} - -div.element.protected -{ - border-left-color: orange; -} - -div.element.private -{ - border-left-color: red; -} - -div.element.class, div.element.interface, div.element.trait -{ - border-left-color: #e0e0e0; -} - -div.element.class.abstract h1, div.element.interface.abstract h1 -{ - font-style: italic; -} - -div.element h1 -{ - font-size: 1.2em; - line-height: 1.5em; - margin-bottom: 10px; - padding-left: 22px; - background: transparent no-repeat left 2px; - word-wrap: break-word; -} - -div.element h1 a -{ - color: transparent; - margin-left: 10px; -} - -div.element h1:hover a -{ - color: silver; -} - -div.element h1 a:hover -{ - color: navy; -} - -div.element a.more:hover -{ - background: #f0f0f0; - color: #444; - text-decoration: none; -} - -div.element a.more -{ - font-weight: bold; - text-align: center; - color: gray; - border-top: 1px dashed silver; - display: block; - margin-top: 5px; - padding: 5px 0; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} - -div.element p -{ - font-size: 0.9em; -} - -div.element .table -{ - font-size: 0.9em; -} - -div.element .table th -{ - text-transform: capitalize; -} - -div.detail-description -{ - padding-left: 30px; -} - -div.detail-description table th { - vertical-align: top; -} - -body.invert -{ - background: white; -} - -body.invert div.element -{ - background: #f9f9f9; -} - -ul.side-nav -{ - clear: both; -} - -ul.side-nav li -{ - word-wrap: break-word; - padding-left: 10px; - text-indent: -10px; -} - -ul.side-nav li a -{ - background: transparent no-repeat 5px 3px; - padding-bottom: 10px; - font-style: italic; -} - -ul.side-nav li pre -{ - font-size: 0.8em; - margin: 5px 15px 0 15px; - padding: 2px 5px; - background-color: #f8f8f8; - color: gray; - font-style: normal; - word-wrap: break-word; - text-indent: 0; -} - -ul.side-nav li.view-simple span.description -{ - display: none; -} - -ul.side-nav li.view-simple pre -{ - font-size: inherit; - margin: inherit; - padding: inherit; - background-color: inherit; - border: none; - color: inherit; - font-family: inherit; - font-style: inherit; - padding-bottom: 0; - padding-left: 5px; -} - -ul.side-nav li.view-simple a -{ - padding-bottom: 0; -} - -i.icon-custom -{ - width: 16px; - height: 16px; - background-position: 0; -} - -.table.markers -{ - background: white; -} - -/* JS only functionality; disable by default */ -.btn-group.visibility, .btn-group.view, .btn-group.type-filter -{ - display: none; -} - -.visibility button -{ - height: 24px; -} - -div.element.constant h1, -i.icon-constant { background-image: url('../img/icons/constant.png'); } - -div.element.function h1, -i.icon-function { background-image: url('../img/icons/function.png'); } - -div.element.method h1, -i.icon-method { background-image: url('../img/icons/method.png'); } - -div.element.class h1, -i.icon-class { background-image: url('../img/icons/class.png'); } - -div.element.interface h1, -i.icon-interface { background-image: url('../img/icons/interface.png'); } - -div.element.trait h1, -i.icon-trait { background-image: url('../img/icons/trait.png'); } - -div.element.property h1, -i.icon-property { background-image: url('../img/icons/property.png'); } - -span.empty-namespace -{ - color: silver; -} - -footer -{ - text-align: right; - font-size: 0.8em; - opacity: 0.5; -} - -#mapHolder -{ - border: 4px solid #555; - padding: 0 !important; - overflow: hidden -} - -div.element div.subelement -{ - margin-left: 10px; - padding-bottom: 5px; - clear: both; -} - -pre code -{ - border: none; -} - -div.element div.subelement > code -{ - font-size: 0.8em; - float: left; - margin-right: 10px; - padding: 0 5px; - line-height: 16px; -} - -div.element div.subelement > p -{ - margin-left: 20px; - margin-right: 50px; -} - -div.element div.subelement h4 -{ - color: #666; - margin-bottom: 5px; -} - -div.element div.subelement.response -{ - padding-bottom: 15px; - margin-right: 50px; -} - -div.labels -{ - text-align: right; -} - -.nav-list .nav-header -{ - font-size: 13px; -} - -.nav-list .nav-header .side-nav-header -{ - font-weight: bold; - line-height: 18px; - color: #999999; - text-transform: uppercase; -} - -.detail-description code { - white-space: pre; - display: inline-block; - padding: 10px; -} - -.go_to_top -{ - float: right; - margin-right: 20px; - background: #2C2C2C; - color: #999; - padding: 3px 10px; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - line-height: 19px; -} - -.visibility .btn { - text-transform: uppercase; - font-size: 0.7em; - font-weight: bold; -} - -.iviewer_common -{ - z-index: 100; -} - -@media (min-width: 980px) -{ - a[name] - { - margin-top: -50px; - position: absolute; - } -} - -@media (min-width: 1200px) -{ - .method .span4 - { - width: 345px; - } -} - -/* redefined because twitter bootstrap assumes that bootstrap-responsive.css */ -@media (max-width: 980px) -{ - body - { - padding-top: 0; - } - - .go_to_top - { - display: none; - } - - .btn-group.visibility - { - font-size: 0.80em; - margin-bottom: 7px; - display: inline-block; - float: right; - } -} - -@media (max-width: 768px) -{ - .hero-unit h1 { - font-size: 30px; - } - .hero-unit h2 { - font-size: 19px; - } - -} -@media (min-width: 768px) and (max-width: 980px) -{ - .method .span4 - { - width: 203px; - } -} diff --git a/docs/deprecated.html b/docs/deprecated.html deleted file mode 100644 index 8e52f8c..0000000 --- a/docs/deprecated.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - » Deprecated elements - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- -
- -
- -
- - -
-
No deprecated elements have been found in this project.
-
-
-
-
- - - - diff --git a/docs/errors.html b/docs/errors.html deleted file mode 100644 index 909230d..0000000 --- a/docs/errors.html +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - » Compilation errors - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
- - -
- -
- - - -
- -

- - rave.php - 47 -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeLineDescription
error0No summary was found for this file
error60Argument $publicKey is missing from the Docblock of __construct
error155Argument $amount is missing from the Docblock of setAmount
error173Argument $paymentMethod is missing from the Docblock of setPaymentMethod
error191Argument $customDescription is missing from the Docblock of setDescription
error209Argument $customLogo is missing from the Docblock of setLogo
error227Argument $customTitle is missing from the Docblock of setTitle
error245Argument $country is missing from the Docblock of setCountry
error263Argument $currency is missing from the Docblock of setCurrency
error281Argument $customerEmail is missing from the Docblock of setEmail
error299Argument $customerFirstname is missing from the Docblock of setFirstname
error317Argument $customerLastname is missing from the Docblock of setLastname
error335Argument $customerPhone is missing from the Docblock of setPhoneNumber
error353Argument $payButtonText is missing from the Docblock of setPayButtonText
error371Argument $redirectUrl is missing from the Docblock of setRedirectUrl
error389Argument $meta is missing from the Docblock of setMetaData
error407Argument $handler is missing from the Docblock of eventHandler
error417Argument $referenceNumber is missing from the Docblock of requeryTransaction
error514Argument $referenceNumber is missing from the Docblock of paymentCanceled
error22No summary for property $publicKey
error23No summary for property $secretKey
error24No summary for property $amount
error25No summary for property $paymentMethod
error26No summary for property $customDescription
error27No summary for property $customLogo
error28No summary for property $customTitle
error29No summary for property $country
error30No summary for property $currency
error31No summary for property $customerEmail
error32No summary for property $customerFirstname
error33No summary for property $customerLastname
error34No summary for property $customerPhone
error35No summary for property $txref
error36No summary for property $integrityHash
error37No summary for property $payButtonText
error38No summary for property $redirectUrl
error39No summary for property $meta
error40No summary for property $env
error41No summary for property $transactionPrefix
error42No summary for property $logger
error43No summary for property $handler
error44No summary for property $stagingUrl
error45No summary for property $liveUrl
error46No summary for property $baseUrl
error47No summary for property $transactionData
error48No summary for property $overrideTransactionReference
error49No summary for property $requeryCount
-
-
-
- -

- - raveEventHandlerInterface.php - 9 -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeLineDescription
error0No summary was found for this file
error21Argument $initializationData is missing from the Docblock of onInit
error27Argument $transactionData is missing from the Docblock of onSuccessful
error33Argument $transactionData is missing from the Docblock of onFailure
error39Argument $transactionReference is missing from the Docblock of onRequery
error45Argument $requeryResponse is missing from the Docblock of onRequeryError
error51Argument $transactionReference is missing from the Docblock of onCancel
error58Argument $transactionReference is missing from the Docblock of onTimeout
error58Argument $data is missing from the Docblock of onTimeout
-
-
-
-
-
- - - - diff --git a/docs/graph_class.html b/docs/graph_class.html deleted file mode 100644 index 6dbe34a..0000000 --- a/docs/graph_class.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - API Documentation - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
-
-
- - - -
- - - - diff --git a/docs/img/apple-touch-icon-114x114.png b/docs/img/apple-touch-icon-114x114.png deleted file mode 100644 index 1506f6a..0000000 Binary files a/docs/img/apple-touch-icon-114x114.png and /dev/null differ diff --git a/docs/img/apple-touch-icon-72x72.png b/docs/img/apple-touch-icon-72x72.png deleted file mode 100644 index d813259..0000000 Binary files a/docs/img/apple-touch-icon-72x72.png and /dev/null differ diff --git a/docs/img/apple-touch-icon.png b/docs/img/apple-touch-icon.png deleted file mode 100644 index 2d320cb..0000000 Binary files a/docs/img/apple-touch-icon.png and /dev/null differ diff --git a/docs/img/favicon.ico b/docs/img/favicon.ico deleted file mode 100644 index 9575ac8..0000000 Binary files a/docs/img/favicon.ico and /dev/null differ diff --git a/docs/img/glyphicons-halflings-white.png b/docs/img/glyphicons-halflings-white.png deleted file mode 100644 index a20760b..0000000 Binary files a/docs/img/glyphicons-halflings-white.png and /dev/null differ diff --git a/docs/img/glyphicons-halflings.png b/docs/img/glyphicons-halflings.png deleted file mode 100644 index 92d4445..0000000 Binary files a/docs/img/glyphicons-halflings.png and /dev/null differ diff --git a/docs/img/icons/arrow_down.png b/docs/img/icons/arrow_down.png deleted file mode 100644 index 61505ad..0000000 Binary files a/docs/img/icons/arrow_down.png and /dev/null differ diff --git a/docs/img/icons/arrow_right.png b/docs/img/icons/arrow_right.png deleted file mode 100644 index 60c5927..0000000 Binary files a/docs/img/icons/arrow_right.png and /dev/null differ diff --git a/docs/img/icons/class.png b/docs/img/icons/class.png deleted file mode 100644 index 87c2107..0000000 Binary files a/docs/img/icons/class.png and /dev/null differ diff --git a/docs/img/icons/constant.png b/docs/img/icons/constant.png deleted file mode 100644 index f5f180d..0000000 Binary files a/docs/img/icons/constant.png and /dev/null differ diff --git a/docs/img/icons/favicon.ico b/docs/img/icons/favicon.ico deleted file mode 100644 index df28db3..0000000 Binary files a/docs/img/icons/favicon.ico and /dev/null differ diff --git a/docs/img/icons/file-php.png b/docs/img/icons/file-php.png deleted file mode 100644 index c323f09..0000000 Binary files a/docs/img/icons/file-php.png and /dev/null differ diff --git a/docs/img/icons/file.gif b/docs/img/icons/file.gif deleted file mode 100644 index 7e62167..0000000 Binary files a/docs/img/icons/file.gif and /dev/null differ diff --git a/docs/img/icons/folder.gif b/docs/img/icons/folder.gif deleted file mode 100644 index 2b31631..0000000 Binary files a/docs/img/icons/folder.gif and /dev/null differ diff --git a/docs/img/icons/function.png b/docs/img/icons/function.png deleted file mode 100644 index c430902..0000000 Binary files a/docs/img/icons/function.png and /dev/null differ diff --git a/docs/img/icons/icon-folder-open-big.png b/docs/img/icons/icon-folder-open-big.png deleted file mode 100644 index fae384e..0000000 Binary files a/docs/img/icons/icon-folder-open-big.png and /dev/null differ diff --git a/docs/img/icons/icon-th-big.png b/docs/img/icons/icon-th-big.png deleted file mode 100644 index 04b0ad8..0000000 Binary files a/docs/img/icons/icon-th-big.png and /dev/null differ diff --git a/docs/img/icons/icon_template.svg b/docs/img/icons/icon_template.svg deleted file mode 100644 index b0428aa..0000000 --- a/docs/img/icons/icon_template.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - Co - - diff --git a/docs/img/icons/interface.png b/docs/img/icons/interface.png deleted file mode 100644 index 51a3a17..0000000 Binary files a/docs/img/icons/interface.png and /dev/null differ diff --git a/docs/img/icons/method.png b/docs/img/icons/method.png deleted file mode 100644 index a7cc004..0000000 Binary files a/docs/img/icons/method.png and /dev/null differ diff --git a/docs/img/icons/ok.png b/docs/img/icons/ok.png deleted file mode 100644 index 39f287a..0000000 Binary files a/docs/img/icons/ok.png and /dev/null differ diff --git a/docs/img/icons/property.png b/docs/img/icons/property.png deleted file mode 100644 index e76d52b..0000000 Binary files a/docs/img/icons/property.png and /dev/null differ diff --git a/docs/img/icons/search.gif b/docs/img/icons/search.gif deleted file mode 100644 index eef46fc..0000000 Binary files a/docs/img/icons/search.gif and /dev/null differ diff --git a/docs/img/icons/variable.png b/docs/img/icons/variable.png deleted file mode 100644 index a39bc19..0000000 Binary files a/docs/img/icons/variable.png and /dev/null differ diff --git a/docs/img/icons/view_source.png b/docs/img/icons/view_source.png deleted file mode 100644 index 0c76bd1..0000000 Binary files a/docs/img/icons/view_source.png and /dev/null differ diff --git a/docs/img/icons/visibility_private.png b/docs/img/icons/visibility_private.png deleted file mode 100644 index 386dc2d..0000000 Binary files a/docs/img/icons/visibility_private.png and /dev/null differ diff --git a/docs/img/icons/visibility_protected.png b/docs/img/icons/visibility_protected.png deleted file mode 100644 index d3bd8e7..0000000 Binary files a/docs/img/icons/visibility_protected.png and /dev/null differ diff --git a/docs/img/icons/visibility_public.png b/docs/img/icons/visibility_public.png deleted file mode 100644 index 4e10063..0000000 Binary files a/docs/img/icons/visibility_public.png and /dev/null differ diff --git a/docs/img/iviewer/grab.cur b/docs/img/iviewer/grab.cur deleted file mode 100644 index ef540be..0000000 Binary files a/docs/img/iviewer/grab.cur and /dev/null differ diff --git a/docs/img/iviewer/hand.cur b/docs/img/iviewer/hand.cur deleted file mode 100644 index 1a5bafb..0000000 Binary files a/docs/img/iviewer/hand.cur and /dev/null differ diff --git a/docs/img/iviewer/iviewer.rotate_left.png b/docs/img/iviewer/iviewer.rotate_left.png deleted file mode 100644 index df0956d..0000000 Binary files a/docs/img/iviewer/iviewer.rotate_left.png and /dev/null differ diff --git a/docs/img/iviewer/iviewer.rotate_right.png b/docs/img/iviewer/iviewer.rotate_right.png deleted file mode 100644 index 7a6c829..0000000 Binary files a/docs/img/iviewer/iviewer.rotate_right.png and /dev/null differ diff --git a/docs/img/iviewer/iviewer.zoom_fit.png b/docs/img/iviewer/iviewer.zoom_fit.png deleted file mode 100644 index 364e01d..0000000 Binary files a/docs/img/iviewer/iviewer.zoom_fit.png and /dev/null differ diff --git a/docs/img/iviewer/iviewer.zoom_fit2.gif b/docs/img/iviewer/iviewer.zoom_fit2.gif deleted file mode 100644 index 3199a1e..0000000 Binary files a/docs/img/iviewer/iviewer.zoom_fit2.gif and /dev/null differ diff --git a/docs/img/iviewer/iviewer.zoom_in.png b/docs/img/iviewer/iviewer.zoom_in.png deleted file mode 100644 index 7899332..0000000 Binary files a/docs/img/iviewer/iviewer.zoom_in.png and /dev/null differ diff --git a/docs/img/iviewer/iviewer.zoom_in2.gif b/docs/img/iviewer/iviewer.zoom_in2.gif deleted file mode 100644 index 5d59618..0000000 Binary files a/docs/img/iviewer/iviewer.zoom_in2.gif and /dev/null differ diff --git a/docs/img/iviewer/iviewer.zoom_out.png b/docs/img/iviewer/iviewer.zoom_out.png deleted file mode 100644 index 893f350..0000000 Binary files a/docs/img/iviewer/iviewer.zoom_out.png and /dev/null differ diff --git a/docs/img/iviewer/iviewer.zoom_out2.gif b/docs/img/iviewer/iviewer.zoom_out2.gif deleted file mode 100644 index 77ec19a..0000000 Binary files a/docs/img/iviewer/iviewer.zoom_out2.gif and /dev/null differ diff --git a/docs/img/iviewer/iviewer.zoom_zero.png b/docs/img/iviewer/iviewer.zoom_zero.png deleted file mode 100644 index c981db6..0000000 Binary files a/docs/img/iviewer/iviewer.zoom_zero.png and /dev/null differ diff --git a/docs/img/iviewer/iviewer.zoom_zero2.gif b/docs/img/iviewer/iviewer.zoom_zero2.gif deleted file mode 100644 index e56c670..0000000 Binary files a/docs/img/iviewer/iviewer.zoom_zero2.gif and /dev/null differ diff --git a/docs/img/loader.gif b/docs/img/loader.gif deleted file mode 100644 index 1209425..0000000 Binary files a/docs/img/loader.gif and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 69640fb..0000000 --- a/docs/index.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - API Documentation - - - - - - - - - - - - - - - - - - - - - - -
- - -
-

API Documentation

-

Documentation

-
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
-
-
- - - - diff --git a/docs/js/SVGPan.js b/docs/js/SVGPan.js deleted file mode 100644 index 4966b99..0000000 --- a/docs/js/SVGPan.js +++ /dev/null @@ -1,232 +0,0 @@ -/** - * SVGPan library 1.2 - phpDocumentor1 - * ==================== - * - * Given an unique existing element with id "viewport", including the - * the library into any SVG adds the following capabilities: - * - * - Mouse panning - * - Mouse zooming (using the wheel) - * - Object dargging - * - * Known issues: - * - * - Zooming (while panning) on Safari has still some issues - * - * Releases: - * - * 1.2 - phpDocumentor1, Fri Apr 08 19:19:00 CET 2011, Mike van Riel - * Increased zoom speed with 20% - * Disabled element moving functionality - * - * 1.2, Sat Mar 20 08:42:50 GMT 2010, Zeng Xiaohui - * Fixed a bug with browser mouse handler interaction - * - * 1.1, Wed Feb 3 17:39:33 GMT 2010, Zeng Xiaohui - * Updated the zoom code to support the mouse wheel on Safari/Chrome - * - * 1.0, Andrea Leofreddi - * First release - * - * This code is licensed under the following BSD license: - * - * Copyright 2009-2010 Andrea Leofreddi . All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. 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 Andrea Leofreddi ``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 Andrea Leofreddi 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. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Andrea Leofreddi. - */ - -var root = document.documentElement; - -var state = 'none', stateTarget, stateOrigin, stateTf; - -setupHandlers(root); - -/** - * Register handlers - */ -function setupHandlers(root){ - setAttributes(root, { - "onmouseup" : "add(evt)", - "onmousedown" : "handleMouseDown(evt)", - "onmousemove" : "handleMouseMove(evt)", - "onmouseup" : "handleMouseUp(evt)", -// "onmouseout" : "handleMouseUp(evt)" // Decomment this to stop the pan functionality when dragging out of the SVG element - }); - - if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) - window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari - else - window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others -} - -/** - * Instance an SVGPoint object with given event coordinates. - */ -function getEventPoint(evt) { - var p = root.createSVGPoint(); - - p.x = evt.clientX; - p.y = evt.clientY; - - return p; -} - -/** - * Sets the current transform matrix of an element. - */ -function setCTM(element, matrix) { - var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")"; - - element.setAttribute("transform", s); -} - -/** - * Dumps a matrix to a string (useful for debug). - */ -function dumpMatrix(matrix) { - var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]"; - - return s; -} - -/** - * Sets attributes of an element. - */ -function setAttributes(element, attributes){ - for (i in attributes) - element.setAttributeNS(null, i, attributes[i]); -} - -/** - * Handle mouse move event. - */ -function handleMouseWheel(evt) { - if(evt.preventDefault) - evt.preventDefault(); - - evt.returnValue = false; - - var svgDoc = evt.target.ownerDocument; - - var delta; - - if(evt.wheelDelta) - delta = evt.wheelDelta / 3600; // Chrome/Safari - else - delta = evt.detail / -90; // Mozilla - - var z = 1 + (delta * 1.2); // Zoom factor: 0.9/1.1 - - var g = svgDoc.getElementById("viewport"); - - var p = getEventPoint(evt); - - p = p.matrixTransform(g.getCTM().inverse()); - - // Compute new scale matrix in current mouse position - var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y); - - setCTM(g, g.getCTM().multiply(k)); - - stateTf = stateTf.multiply(k.inverse()); -} - -/** - * Handle mouse move event. - */ -function handleMouseMove(evt) { - if(evt.preventDefault) - evt.preventDefault(); - - evt.returnValue = false; - - var svgDoc = evt.target.ownerDocument; - - var g = svgDoc.getElementById("viewport"); - - if(state == 'pan') { - // Pan mode - var p = getEventPoint(evt).matrixTransform(stateTf); - - setCTM(g, stateTf.inverse().translate(p.x - stateOrigin.x, p.y - stateOrigin.y)); - } else if(state == 'move') { - // Move mode - var p = getEventPoint(evt).matrixTransform(g.getCTM().inverse()); - - setCTM(stateTarget, root.createSVGMatrix().translate(p.x - stateOrigin.x, p.y - stateOrigin.y).multiply(g.getCTM().inverse()).multiply(stateTarget.getCTM())); - - stateOrigin = p; - } -} - -/** - * Handle click event. - */ -function handleMouseDown(evt) { - if(evt.preventDefault) - evt.preventDefault(); - - evt.returnValue = false; - - var svgDoc = evt.target.ownerDocument; - - var g = svgDoc.getElementById("viewport"); - -// if(evt.target.tagName == "svg") { - // Pan mode - state = 'pan'; - - stateTf = g.getCTM().inverse(); - - stateOrigin = getEventPoint(evt).matrixTransform(stateTf); -// } else { - // Move mode -// state = 'move'; -// -// stateTarget = evt.target; -// -// stateTf = g.getCTM().inverse(); -// -// stateOrigin = getEventPoint(evt).matrixTransform(stateTf); -// } -} - -/** - * Handle mouse button release event. - */ -function handleMouseUp(evt) { - if(evt.preventDefault) - evt.preventDefault(); - - evt.returnValue = false; - - var svgDoc = evt.target.ownerDocument; - - if(state == 'pan' || state == 'move') { - // Quit pan mode - state = ''; - } -} - diff --git a/docs/js/bootstrap.js b/docs/js/bootstrap.js deleted file mode 100644 index c832ccb..0000000 --- a/docs/js/bootstrap.js +++ /dev/null @@ -1,1722 +0,0 @@ -/* =================================================== - * bootstrap-transition.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - -!function( $ ) { - - $(function () { - - "use strict" - - /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) - * ======================================================= */ - - $.support.transition = (function () { - var thisBody = document.body || document.documentElement - , thisStyle = thisBody.style - , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined - - return support && { - end: (function () { - var transitionEnd = "TransitionEnd" - if ( $.browser.webkit ) { - transitionEnd = "webkitTransitionEnd" - } else if ( $.browser.mozilla ) { - transitionEnd = "transitionend" - } else if ( $.browser.opera ) { - transitionEnd = "oTransitionEnd" - } - return transitionEnd - }()) - } - })() - - }) - -}( window.jQuery ) -/* ========================================================== - * bootstrap-alert.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#alerts - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function( $ ){ - - "use strict" - - /* ALERT CLASS DEFINITION - * ====================== */ - - var dismiss = '[data-dismiss="alert"]' - , Alert = function ( el ) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype = { - - constructor: Alert - - , close: function ( e ) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - $parent.trigger('close') - - e && e.preventDefault() - - $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) - - $parent.removeClass('in') - - function removeElement() { - $parent.remove() - $parent.trigger('closed') - } - - $.support.transition && $parent.hasClass('fade') ? - $parent.on($.support.transition.end, removeElement) : - removeElement() - } - - } - - - /* ALERT PLUGIN DEFINITION - * ======================= */ - - $.fn.alert = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('alert') - if (!data) $this.data('alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - /* ALERT DATA-API - * ============== */ - - $(function () { - $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) - }) - -}( window.jQuery ) -/* ============================================================ - * bootstrap-button.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#buttons - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - -!function( $ ){ - - "use strict" - - /* BUTTON PUBLIC CLASS DEFINITION - * ============================== */ - - var Button = function ( element, options ) { - this.$element = $(element) - this.options = $.extend({}, $.fn.button.defaults, options) - } - - Button.prototype = { - - constructor: Button - - , setState: function ( state ) { - var d = 'disabled' - , $el = this.$element - , data = $el.data() - , val = $el.is('input') ? 'val' : 'html' - - state = state + 'Text' - data.resetText || $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout(function () { - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d) - }, 0) - } - - , toggle: function () { - var $parent = this.$element.parent('[data-toggle="buttons-radio"]') - - $parent && $parent - .find('.active') - .removeClass('active') - - this.$element.toggleClass('active') - } - - } - - - /* BUTTON PLUGIN DEFINITION - * ======================== */ - - $.fn.button = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('button') - , options = typeof option == 'object' && option - if (!data) $this.data('button', (data = new Button(this, options))) - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.defaults = { - loadingText: 'loading...' - } - - $.fn.button.Constructor = Button - - - /* BUTTON DATA-API - * =============== */ - - $(function () { - $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { - $(e.target).button('toggle') - }) - }) - -}( window.jQuery ) -/* ========================================================== - * bootstrap-carousel.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#carousel - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function( $ ){ - - "use strict" - - /* CAROUSEL CLASS DEFINITION - * ========================= */ - - var Carousel = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.carousel.defaults, options) - this.options.slide && this.slide(this.options.slide) - } - - Carousel.prototype = { - - cycle: function () { - this.interval = setInterval($.proxy(this.next, this), this.options.interval) - return this - } - - , to: function (pos) { - var $active = this.$element.find('.active') - , children = $active.parent().children() - , activePos = children.index($active) - , that = this - - if (pos > (children.length - 1) || pos < 0) return - - if (this.sliding) { - return this.$element.one('slid', function () { - that.to(pos) - }) - } - - if (activePos == pos) { - return this.pause().cycle() - } - - return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) - } - - , pause: function () { - clearInterval(this.interval) - return this - } - - , next: function () { - if (this.sliding) return - return this.slide('next') - } - - , prev: function () { - if (this.sliding) return - return this.slide('prev') - } - - , slide: function (type, next) { - var $active = this.$element.find('.active') - , $next = next || $active[type]() - , isCycling = this.interval - , direction = type == 'next' ? 'left' : 'right' - , fallback = type == 'next' ? 'first' : 'last' - , that = this - - this.sliding = true - - isCycling && this.pause() - - $next = $next.length ? $next : this.$element.find('.item')[fallback]() - - if (!$.support.transition && this.$element.hasClass('slide')) { - this.$element.trigger('slide') - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid') - } else { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - this.$element.trigger('slide') - this.$element.one($.support.transition.end, function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { that.$element.trigger('slid') }, 0) - }) - } - - isCycling && this.cycle() - - return this - } - - } - - - /* CAROUSEL PLUGIN DEFINITION - * ========================== */ - - $.fn.carousel = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('carousel') - , options = typeof option == 'object' && option - if (!data) $this.data('carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (typeof option == 'string' || (option = options.slide)) data[option]() - else data.cycle() - }) - } - - $.fn.carousel.defaults = { - interval: 5000 - } - - $.fn.carousel.Constructor = Carousel - - - /* CAROUSEL DATA-API - * ================= */ - - $(function () { - $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) - $target.carousel(options) - e.preventDefault() - }) - }) - -}( window.jQuery ) -/* ============================================================= - * bootstrap-collapse.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#collapse - * ============================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - -!function( $ ){ - - "use strict" - - var Collapse = function ( element, options ) { - this.$element = $(element) - this.options = $.extend({}, $.fn.collapse.defaults, options) - - if (this.options["parent"]) { - this.$parent = $(this.options["parent"]) - } - - this.options.toggle && this.toggle() - } - - Collapse.prototype = { - - constructor: Collapse - - , dimension: function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - , show: function () { - var dimension = this.dimension() - , scroll = $.camelCase(['scroll', dimension].join('-')) - , actives = this.$parent && this.$parent.find('.in') - , hasData - - if (actives && actives.length) { - hasData = actives.data('collapse') - actives.collapse('hide') - hasData || actives.data('collapse', null) - } - - this.$element[dimension](0) - this.transition('addClass', 'show', 'shown') - this.$element[dimension](this.$element[0][scroll]) - - } - - , hide: function () { - var dimension = this.dimension() - this.reset(this.$element[dimension]()) - this.transition('removeClass', 'hide', 'hidden') - this.$element[dimension](0) - } - - , reset: function ( size ) { - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - [dimension](size || 'auto') - [0].offsetWidth - - this.$element.addClass('collapse') - } - - , transition: function ( method, startEvent, completeEvent ) { - var that = this - , complete = function () { - if (startEvent == 'show') that.reset() - that.$element.trigger(completeEvent) - } - - this.$element - .trigger(startEvent) - [method]('in') - - $.support.transition && this.$element.hasClass('collapse') ? - this.$element.one($.support.transition.end, complete) : - complete() - } - - , toggle: function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - } - - /* COLLAPSIBLE PLUGIN DEFINITION - * ============================== */ - - $.fn.collapse = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('collapse') - , options = typeof option == 'object' && option - if (!data) $this.data('collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.collapse.defaults = { - toggle: true - } - - $.fn.collapse.Constructor = Collapse - - - /* COLLAPSIBLE DATA-API - * ==================== */ - - $(function () { - $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $(target).collapse(option) - }) - }) - -}( window.jQuery ) -/* ============================================================ - * bootstrap-dropdown.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#dropdowns - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function( $ ){ - - "use strict" - - /* DROPDOWN CLASS DEFINITION - * ========================= */ - - var toggle = '[data-toggle="dropdown"]' - , Dropdown = function ( element ) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) - } - - Dropdown.prototype = { - - constructor: Dropdown - - , toggle: function ( e ) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - , isActive - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - $parent.length || ($parent = $this.parent()) - - isActive = $parent.hasClass('open') - - clearMenus() - !isActive && $parent.toggleClass('open') - - return false - } - - } - - function clearMenus() { - $(toggle).parent().removeClass('open') - } - - - /* DROPDOWN PLUGIN DEFINITION - * ========================== */ - - $.fn.dropdown = function ( option ) { - return this.each(function () { - var $this = $(this) - , data = $this.data('dropdown') - if (!data) $this.data('dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.dropdown.Constructor = Dropdown - - - /* APPLY TO STANDARD DROPDOWN ELEMENTS - * =================================== */ - - $(function () { - $('html').on('click.dropdown.data-api', clearMenus) - $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) - }) - -}( window.jQuery ) -/* ========================================================= - * bootstrap-modal.js v2.0.0 - * http://twitter.github.com/bootstrap/javascript.html#modals - * ========================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ - - -!function( $ ){ - - "use strict" - - /* MODAL CLASS DEFINITION - * ====================== */ - - var Modal = function ( content, options ) { - this.options = $.extend({}, $.fn.modal.defaults, options) - this.$element = $(content) - .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) - } - - Modal.prototype = { - - constructor: Modal - - , toggle: function () { - return this[!this.isShown ? 'show' : 'hide']() - } - - , show: function () { - var that = this - - if (this.isShown) return - - $('body').addClass('modal-open') - - this.isShown = true - this.$element.trigger('show') - - escape.call(this) - backdrop.call(this, function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - !that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position - - that.$element - .show() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - transition ? - that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : - that.$element.trigger('shown') - - }) - } - - , hide: function ( e ) { - e && e.preventDefault() - - if (!this.isShown) return - - var that = this - this.isShown = false - - $('body').removeClass('modal-open') - - escape.call(this) - - this.$element - .trigger('hide') - .removeClass('in') - - $.support.transition && this.$element.hasClass('fade') ? - hideWithTransition.call(this) : - hideModal.call(this) - } - - } - - - /* MODAL PRIVATE METHODS - * ===================== */ - - function hideWithTransition() { - var that = this - , timeout = setTimeout(function () { - that.$element.off($.support.transition.end) - hideModal.call(that) - }, 500) - - this.$element.one($.support.transition.end, function () { - clearTimeout(timeout) - hideModal.call(that) - }) - } - - function hideModal( that ) { - this.$element - .hide() - .trigger('hidden') - - backdrop.call(this) - } - - function backdrop( callback ) { - var that = this - , animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $('');this.target.append(az);az.height(aD);az.width(aA);az.css("top",this.eventCanvas._offsets.top);az.css("left",this.eventCanvas._offsets.left);var aC=L('
');az.append(aC);aC.html(this.noDataIndicator.indicator);var aB=aC.height();var ax=aC.width();aC.height(aB);aC.width(ax);aC.css("top",(aD-aB)/2+"px")})}}this.data=L.extend(true,[],ar);this.parseOptions(ay);if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.computePlotData();for(var at=0;at0){for(var aq=au;aq--;){var an=this._plotData[aq][ap][av];if(aw*an>=0){this._plotData[au][ap][av]+=an;this._stackData[au][ap][av]+=an;break}}}}}else{for(var ar=0;ar0){at._prevPlotData=this.series[au-1]._plotData}at._sumy=0;at._sumx=0;for(ar=at.data.length-1;ar>-1;ar--){at._sumy+=at.data[ar][1];at._sumx+=at.data[ar][0]}}};this.populatePlotData=function(au,av){this._plotData=[];this._stackData=[];au._stackData=[];au._plotData=[];var ay={x:[],y:[]};if(this.stackSeries&&!au.disableStack){au._stack=true;var ax=(au._stackAxis==="x")?0:1;var az=L.extend(true,[],au.data);var aA=L.extend(true,[],au.data);var an,am,ao,aw,al;for(var ar=0;ar=0){aA[aq][ax]+=aw}}}for(var at=0;at0){au._prevPlotData=this.series[av-1]._plotData}au._sumy=0;au._sumx=0;for(at=au.data.length-1;at>-1;at--){au._sumy+=au.data[at][1];au._sumx+=au.data[at][0]}};this.getNextSeriesColor=(function(am){var al=0;var an=am.seriesColors;return function(){if(al=0&&an>=0){al.top+=aK;al.bottom+=aK;al.left+=an;al.right+=an}}var am=["top","bottom","left","right"];for(var aB in am){if(this._gridPadding[am[aB]]==null&&al[am[aB]]>0){this._gridPadding[am[aB]]=al[am[aB]]}else{if(this._gridPadding[am[aB]]==null){this._gridPadding[am[aB]]=this._defaultGridPadding[am[aB]]}}}var aA=this._gridPadding;if(this.legend.placement==="outsideGrid"){aA={top:this.title.getHeight(),left:0,right:0,bottom:0};if(this.legend.location==="s"){aA.left=this._gridPadding.left;aA.right=this._gridPadding.right}}ar.xaxis.pack({position:"absolute",bottom:this._gridPadding.bottom-ar.xaxis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});ar.yaxis.pack({position:"absolute",top:0,left:this._gridPadding.left-ar.yaxis.getWidth(),height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});ar.x2axis.pack({position:"absolute",top:this._gridPadding.top-ar.x2axis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(aH=8;aH>0;aH--){ar[aG[aH-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-az[aH-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}var au=(this._width-this._gridPadding.left-this._gridPadding.right)/2+this._gridPadding.left-ar.yMidAxis.getWidth()/2;ar.yMidAxis.pack({position:"absolute",top:0,left:au,zIndex:9,textAlign:"center"},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});this.target.append(this.grid.createElement(this._gridPadding,this));this.grid.draw();var aq=this.series;var aJ=aq.length;for(aH=0,aE=aJ;aHax)?av:ax;var ar=this.series[aw];var aq=this.series[au];if(aq.renderer.smooth){var ap=aq.renderer._smoothedData.slice(0).reverse()}else{var ap=aq.gridData.slice(0).reverse()}if(ar.renderer.smooth){var at=ar.renderer._smoothedData.concat(ap)}else{var at=ar.gridData.concat(ap)}var ao=(an.color!==null)?an.color:this.series[ax].fillColor;var ay=(an.baseSeries!==null)?an.baseSeries:aw;var am=this.series[ay].renderer.shapeRenderer;var al={fillStyle:ao,fill:true,closePath:true};am.draw(ar.shadowCanvas._ctx,at,al)};this.bindCustomEvents=function(){this.eventCanvas._elem.bind("click",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("mousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("mousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("mouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("mouseup",{plot:this},this.onMouseUp)}};function ai(av){var au=av.data.plot;var ap=au.eventCanvas._elem.offset();var at={x:av.pageX-ap.left,y:av.pageY-ap.top};var aq={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null,yMidAxis:null};var ar=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];var al=au.axes;var am,ao;for(am=11;am>0;am--){ao=ar[am-1];if(al[ao].show){aq[ao]=al[ao].series_p2u(at[ao.charAt(0)])}}return{offsets:ap,gridPos:at,dataPos:aq}}function ak(al,am){var aq=am.series;var aW,aU,aT,aO,aP,aJ,aI,aw,au,az,aA,aK;var aS,aX,aQ,ar,aH,aM,aV;var an,aN;for(aT=am.seriesStack.length-1;aT>=0;aT--){aW=am.seriesStack[aT];aO=aq[aW];aV=aO._highlightThreshold;switch(aO.renderer.constructor){case L.jqplot.BarRenderer:aJ=al.x;aI=al.y;for(aU=0;aUaH[0][0]&&aJaH[2][1]&&aIaH[0][0]+aV[0][0]&&aJaH[2][1]&&aI0&&-aI>=0){aw=2*Math.PI-Math.atan(-aI/aJ)}else{if(aJ>0&&-aI<0){aw=-Math.atan(-aI/aJ)}else{if(aJ<0){aw=Math.PI-Math.atan(-aI/aJ)}else{if(aJ==0&&-aI>0){aw=3*Math.PI/2}else{if(aJ==0&&-aI<0){aw=Math.PI/2}else{if(aJ==0&&aI==0){aw=0}}}}}}if(az){aw-=az;if(aw<0){aw+=2*Math.PI}else{if(aw>2*Math.PI){aw-=2*Math.PI}}}au=aO.sliceMargin/180*Math.PI;if(aPaO._innerRadius){for(aU=0;aU0)?aO.gridData[aU-1][1]+au:au;aK=aO.gridData[aU][1];if(aw>aA&&aw0&&-aI>=0){aw=2*Math.PI-Math.atan(-aI/aJ)}else{if(aJ>0&&-aI<0){aw=-Math.atan(-aI/aJ)}else{if(aJ<0){aw=Math.PI-Math.atan(-aI/aJ)}else{if(aJ==0&&-aI>0){aw=3*Math.PI/2}else{if(aJ==0&&-aI<0){aw=Math.PI/2}else{if(aJ==0&&aI==0){aw=0}}}}}}if(az){aw-=az;if(aw<0){aw+=2*Math.PI}else{if(aw>2*Math.PI){aw-=2*Math.PI}}}au=aO.sliceMargin/180*Math.PI;if(aP0)?aO.gridData[aU-1][1]+au:au;aK=aO.gridData[aU][1];if(aw>aA&&aw=ay[0][1]&&aI<=ay[3][1]&&aJ>=at[0]&&aJ<=aE[0]){return{seriesIndex:aO.index,pointIndex:aU,gridData:null,data:aO.data[aU]}}}break;case L.jqplot.LineRenderer:aJ=al.x;aI=al.y;aP=aO.renderer;if(aO.show){if((aO.fill||(aO.renderer.bands.show&&aO.renderer.bands.fill))&&(!am.plugins.highlighter||!am.plugins.highlighter.show)){var ax=false;if(aJ>aO._boundingBox[0][0]&&aJaO._boundingBox[1][1]&&aI=aI||aB[1]=aI){if(aC[0]+(aI-aC[1])/(aB[1]-aC[1])*(aB[0]-aC[0])0)?aN:0;for(var aU=0;aU=aQ[0]-aP._bodyWidth/2&&aJ<=aQ[0]+aP._bodyWidth/2&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{if(!aP.hlc){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][1])&&aI<=av(aO.data[aU][2])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}else{if(aQ[0]!=null&&aQ[1]!=null){aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=an&&(aX<=aS||aS==null)){aS=aX;return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}}}break;default:aJ=al.x;aI=al.y;aP=aO.renderer;if(aO.show){aN=aO.markerRenderer.size/2+aO.neighborThreshold;an=(aN>0)?aN:0;for(var aU=0;aU=aQ[0]-aP._bodyWidth/2&&aJ<=aQ[0]+aP._bodyWidth/2&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{if(!aP.hlc){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][1])&&aI<=av(aO.data[aU][2])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}else{aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=an&&(aX<=aS||aS==null)){aS=aX;return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}break}}return null}this.onClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onDblClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotDblClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseDown=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotMouseDown");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseUp=function(an){var am=ai(an);var al=L.Event("jqplotMouseUp");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,null,an.data.plot])};this.onRightClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);if(ap.captureRightClick){if(an.which==3){var al=L.Event("jqplotRightClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])}else{var al=L.Event("jqplotMouseUp");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])}}};this.onMouseMove=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotMouseMove");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseEnter=function(an){var am=ai(an);var ao=an.data.plot;var al=L.Event("jqplotMouseEnter");al.pageX=an.pageX;al.pageY=an.pageY;al.relatedTarget=an.relatedTarget;L(this).trigger(al,[am.gridPos,am.dataPos,null,ao])};this.onMouseLeave=function(an){var am=ai(an);var ao=an.data.plot;var al=L.Event("jqplotMouseLeave");al.pageX=an.pageX;al.pageY=an.pageY;al.relatedTarget=an.relatedTarget;L(this).trigger(al,[am.gridPos,am.dataPos,null,ao])};this.drawSeries=function(an,al){var ap,ao,am;al=(typeof(an)==="number"&&al==null)?an:al;an=(typeof(an)==="object")?an:{};if(al!=u){ao=this.series[al];am=ao.shadowCanvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.drawShadow(am,an,this);am=ao.canvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.draw(am,an,this);if(ao.renderer.constructor==L.jqplot.BezierCurveRenderer){if(al660)?ah[aj]*0.85:0.73*ah[aj]+90;ah[aj]=parseInt(ah[aj],10);(ah[aj]>255)?255:ah[aj]}ah[3]=0.3+0.35*al[3];ak.push("rgba("+ah[0]+","+ah[1]+","+ah[2]+","+ah[3]+")")}}else{var al=L.jqplot.getColorComponents(ai);var ah=[al[0],al[1],al[2]];var an=ah[0]+ah[1]+ah[2];for(var aj=0;aj<3;aj++){ah[aj]=(an>660)?ah[aj]*0.85:0.73*ah[aj]+90;ah[aj]=parseInt(ah[aj],10);(ah[aj]>255)?255:ah[aj]}ah[3]=0.3+0.35*al[3];ak="rgba("+ah[0]+","+ah[1]+","+ah[2]+","+ah[3]+")"}return ak};L.jqplot.ColorGenerator=function(ai){ai=ai||L.jqplot.config.defaultColors;var ah=0;this.next=function(){if(ah0){return ai[ah--]}else{ah=ai.length-1;return ai[ah]}};this.get=function(ak){var aj=ak-ai.length*Math.floor(ak/ai.length);return ai[aj]};this.setColors=function(aj){ai=aj};this.reset=function(){ah=0};this.getIndex=function(){return ah};this.setIndex=function(aj){ah=aj}};L.jqplot.hex2rgb=function(aj,ah){aj=aj.replace("#","");if(aj.length==3){aj=aj.charAt(0)+aj.charAt(0)+aj.charAt(1)+aj.charAt(1)+aj.charAt(2)+aj.charAt(2)}var ai;ai="rgba("+parseInt(aj.slice(0,2),16)+", "+parseInt(aj.slice(2,4),16)+", "+parseInt(aj.slice(4,6),16);if(ah){ai+=", "+ah}ai+=")";return ai};L.jqplot.rgb2hex=function(am){var aj=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var ah=am.match(aj);var al="#";for(var ak=1;ak<4;ak++){var ai;if(ah[ak].search(/%/)!=-1){ai=parseInt(255*ah[ak]/100,10).toString(16);if(ai.length==1){ai="0"+ai}}else{ai=parseInt(ah[ak],10).toString(16);if(ai.length==1){ai="0"+ai}}al+=ai}return al};L.jqplot.normalize2rgb=function(ai,ah){if(ai.search(/^ *rgba?\(/)!=-1){return ai}else{if(ai.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return L.jqplot.hex2rgb(ai,ah)}else{throw new Error("Invalid color spec")}}};L.jqplot.getColorComponents=function(am){am=L.jqplot.colorKeywordMap[am]||am;var ak=L.jqplot.normalize2rgb(am);var aj=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var ah=ak.match(aj);var ai=[];for(var al=1;al<4;al++){if(ah[al].search(/%/)!=-1){ai[al-1]=parseInt(255*ah[al]/100,10)}else{ai[al-1]=parseInt(ah[al],10)}}ai[3]=parseFloat(ah[4])?parseFloat(ah[4]):1;return ai};L.jqplot.colorKeywordMap={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb( 0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb( 0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb( 0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb( 95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(220, 20, 60)",cyan:"rgb( 0, 255, 255)",darkblue:"rgb( 0, 0, 139)",darkcyan:"rgb( 0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb( 0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb( 85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb( 72, 61, 139)",darkslategray:"rgb( 47, 79, 79)",darkslategrey:"rgb( 47, 79, 79)",darkturquoise:"rgb( 0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb( 0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb( 30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb( 34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb( 0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb( 75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb( 32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb( 0, 255, 0)",limegreen:"rgb( 50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb( 0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb( 60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb( 0, 250, 154)",mediumturquoise:"rgb( 72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb( 25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb( 0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb( 65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb( 46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb( 0, 255, 127)",steelblue:"rgb( 70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb( 0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb( 64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)"};L.jqplot.AxisLabelRenderer=function(ah){L.jqplot.ElemContainer.call(this);this.axis;this.show=true;this.label="";this.fontFamily=null;this.fontSize=null;this.textColor=null;this._elem;this.escapeHTML=false;L.extend(true,this,ah)};L.jqplot.AxisLabelRenderer.prototype=new L.jqplot.ElemContainer();L.jqplot.AxisLabelRenderer.prototype.constructor=L.jqplot.AxisLabelRenderer;L.jqplot.AxisLabelRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.AxisLabelRenderer.prototype.draw=function(ah,ai){if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L('
');if(Number(this.label)){this._elem.css("white-space","nowrap")}if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}return this._elem};L.jqplot.AxisLabelRenderer.prototype.pack=function(){};L.jqplot.AxisTickRenderer=function(ah){L.jqplot.ElemContainer.call(this);this.mark="outside";this.axis;this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.size=4;this.markSize=6;this.show=true;this.showLabel=true;this.label=null;this.value=null;this._styles={};this.formatter=L.jqplot.DefaultTickFormatter;this.prefix="";this.suffix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this.escapeHTML=false;this._elem;this._breakTick=false;L.extend(true,this,ah)};L.jqplot.AxisTickRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.AxisTickRenderer.prototype=new L.jqplot.ElemContainer();L.jqplot.AxisTickRenderer.prototype.constructor=L.jqplot.AxisTickRenderer;L.jqplot.AxisTickRenderer.prototype.setTick=function(ah,aj,ai){this.value=ah;this.axis=aj;if(ai){this.isMinorTick=true}return this};L.jqplot.AxisTickRenderer.prototype.draw=function(){if(this.label===null){this.label=this.prefix+this.formatter(this.formatString,this.value)+this.suffix}var ai={position:"absolute"};if(Number(this.label)){ai.whitSpace="nowrap"}if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L(document.createElement("div"));this._elem.addClass("jqplot-"+this.axis+"-tick");if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}this._elem.css(ai);for(var ah in this._styles){this._elem.css(ah,this._styles[ah])}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}if(this._breakTick){this._elem.addClass("jqplot-breakTick")}return this._elem};L.jqplot.DefaultTickFormatter=function(ah,ai){if(typeof ai=="number"){if(!ah){ah=L.jqplot.config.defaultTickFormatString}return L.jqplot.sprintf(ah,ai)}else{return String(ai)}};L.jqplot.PercentTickFormatter=function(ah,ai){if(typeof ai=="number"){ai=100*ai;if(!ah){ah=L.jqplot.config.defaultTickFormatString}return L.jqplot.sprintf(ah,ai)}else{return String(ai)}};L.jqplot.AxisTickRenderer.prototype.pack=function(){};L.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new L.jqplot.ShadowRenderer()};L.jqplot.CanvasGridRenderer.prototype.init=function(ai){this._ctx;L.extend(true,this,ai);var ah={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(ah)};L.jqplot.CanvasGridRenderer.prototype.createElement=function(ak){var aj;if(this._elem){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){aj=this._elem.get(0);window.G_vmlCanvasManager.uninitElement(aj);aj=null}this._elem.emptyForce();this._elem=null}aj=ak.canvasManager.getCanvas();var ah=this._plotDimensions.width;var ai=this._plotDimensions.height;aj.width=ah;aj.height=ai;this._elem=L(aj);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});aj=ak.canvasManager.initCanvas(aj);this._top=this._offsets.top;this._bottom=ai-this._offsets.bottom;this._left=this._offsets.left;this._right=ah-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;aj=null;return this._elem};L.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var at=this._ctx;var aw=this._axes;at.save();at.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);at.fillStyle=this.backgroundColor||this.background;at.fillRect(this._left,this._top,this._width,this._height);at.save();at.lineJoin="miter";at.lineCap="butt";at.lineWidth=this.gridLineWidth;at.strokeStyle=this.gridLineColor;var aA,az,ap,aq;var am=["xaxis","yaxis","x2axis","y2axis"];for(var ay=4;ay>0;ay--){var aD=am[ay-1];var ah=aw[aD];var aB=ah._ticks;var ar=aB.length;if(ah.show){if(ah.drawBaseline){var aC={};if(ah.baselineWidth!==null){aC.lineWidth=ah.baselineWidth}if(ah.baselineColor!==null){aC.strokeStyle=ah.baselineColor}switch(aD){case"xaxis":ao(this._left,this._bottom,this._right,this._bottom,aC);break;case"yaxis":ao(this._left,this._bottom,this._left,this._top,aC);break;case"x2axis":ao(this._left,this._bottom,this._right,this._bottom,aC);break;case"y2axis":ao(this._right,this._bottom,this._right,this._top,aC);break}}for(var au=ar;au>0;au--){var an=aB[au-1];if(an.show){var ak=Math.round(ah.u2p(an.value))+0.5;switch(aD){case"xaxis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(ak,this._top,ak,this._bottom)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._bottom;az=this._bottom+ap;break;case"inside":aA=this._bottom-ap;az=this._bottom;break;case"cross":aA=this._bottom-ap;az=this._bottom+ap;break;default:aA=this._bottom;az=this._bottom+ap;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[ak,aA],[ak,az]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ao(ak,aA,ak,az)}break;case"yaxis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(this._right,ak,this._left,ak)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._left-ap;az=this._left;break;case"inside":aA=this._left;az=this._left+ap;break;case"cross":aA=this._left-ap;az=this._left+ap;break;default:aA=this._left-ap;az=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[aA,ak],[az,ak]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}break;case"x2axis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(ak,this._bottom,ak,this._top)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._top-ap;az=this._top;break;case"inside":aA=this._top;az=this._top+ap;break;case"cross":aA=this._top-ap;az=this._top+ap;break;default:aA=this._top-ap;az=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[ak,aA],[ak,az]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ao(ak,aA,ak,az)}break;case"y2axis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(this._left,ak,this._right,ak)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._right;az=this._right+ap;break;case"inside":aA=this._right-ap;az=this._right;break;case"cross":aA=this._right-ap;az=this._right+ap;break;default:aA=this._right;az=this._right+ap;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[aA,ak],[az,ak]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}break;default:break}}}an=null}ah=null;aB=null}am=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];for(var ay=7;ay>0;ay--){var ah=aw[am[ay-1]];var aB=ah._ticks;if(ah.show){var ai=aB[ah.numberTicks-1];var al=aB[0];var aj=ah.getLeft();var av=[[aj,ai.getTop()+ai.getHeight()/2],[aj,al.getTop()+al.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(at,av,{lineCap:"butt",fill:false,closePath:false})}ao(av[0][0],av[0][1],av[1][0],av[1][1],{lineCap:"butt",strokeStyle:ah.borderColor,lineWidth:ah.borderWidth});for(var au=aB.length;au>0;au--){var an=aB[au-1];ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;if(an.showMark&&an.mark){switch(aq){case"outside":aA=aj;az=aj+ap;break;case"inside":aA=aj-ap;az=aj;break;case"cross":aA=aj-ap;az=aj+ap;break;default:aA=aj;az=aj+ap;break}av=[[aA,ak],[az,ak]];if(this.shadow){this.renderer.shadowRenderer.draw(at,av,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}an=null}al=null}ah=null;aB=null}at.restore();function ao(aH,aG,aE,ax,aF){at.save();aF=aF||{};if(aF.lineWidth==null||aF.lineWidth!=0){L.extend(true,at,aF);at.beginPath();at.moveTo(aH,aG);at.lineTo(aE,ax);at.stroke();at.restore()}}if(this.shadow){var av=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(at,av)}if(this.borderWidth!=0&&this.drawBorder){ao(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:aw.x2axis.borderColor,lineWidth:aw.x2axis.borderWidth});ao(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:aw.y2axis.borderColor,lineWidth:aw.y2axis.borderWidth});ao(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:aw.xaxis.borderColor,lineWidth:aw.xaxis.borderWidth});ao(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:aw.yaxis.borderColor,lineWidth:aw.yaxis.borderWidth})}at.restore();at=null;aw=null};L.jqplot.DivTitleRenderer=function(){};L.jqplot.DivTitleRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.DivTitleRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}var ak=this.renderer;var aj=document.createElement("div");this._elem=L(aj);this._elem.addClass("jqplot-title");if(!this.text){this.show=false;this._elem.height(0);this._elem.width(0)}else{if(this.text){var ah;if(this.color){ah=this.color}else{if(this.textColor){ah=this.textColor}}var ai={position:"absolute",top:"0px",left:"0px"};if(this._plotWidth){ai.width=this._plotWidth+"px"}if(this.fontSize){ai.fontSize=this.fontSize}if(typeof this.textAlign==="string"){ai.textAlign=this.textAlign}else{ai.textAlign="center"}if(ah){ai.color=ah}if(this.paddingBottom){ai.paddingBottom=this.paddingBottom}if(this.fontFamily){ai.fontFamily=this.fontFamily}this._elem.css(ai);if(this.escapeHtml){this._elem.text(this.text)}else{this._elem.html(this.text)}}}aj=null;return this._elem};L.jqplot.DivTitleRenderer.prototype.pack=function(){};var r=0.1;L.jqplot.LinePattern=function(aw,aq){var ap={dotted:[r,L.jqplot.config.dotGapLength],dashed:[L.jqplot.config.dashLength,L.jqplot.config.gapLength],solid:null};if(typeof aq==="string"){if(aq[0]==="."||aq[0]==="-"){var ax=aq;aq=[];for(var ao=0,al=ax.length;ao0)&&(aC>0)){aA/=aB;az/=aB;while(true){var aD=aC*ar;if(aD=aq.length){ak=0}ar=aq[ak]}else{au=ay;at=aE;if((ak&1)==0){aw.lineTo(au,at)}else{aw.moveTo(au,at)}ar-=aB/aC;break}}}};var ai=function(){aw.beginPath()};var am=function(){aj(an,ah)};return{moveTo:av,lineTo:aj,beginPath:ai,closePath:am}};L.jqplot.LineRenderer=function(){this.shapeRenderer=new L.jqplot.ShapeRenderer();this.shadowRenderer=new L.jqplot.ShadowRenderer()};L.jqplot.LineRenderer.prototype.init=function(ai,an){ai=ai||{};this._type="line";this.renderer.animation={show:false,direction:"left",speed:2500,_supported:true};this.renderer.smooth=false;this.renderer.tension=null;this.renderer.constrainSmoothing=true;this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];this.renderer.bandData=[];this.renderer.bands={show:false,hiData:[],lowData:[],color:this.color,showLines:false,fill:true,fillColor:null,_min:null,_max:null,interval:"3%"};var al={highlightMouseOver:ai.highlightMouseOver,highlightMouseDown:ai.highlightMouseDown,highlightColor:ai.highlightColor};delete (ai.highlightMouseOver);delete (ai.highlightMouseDown);delete (ai.highlightColor);L.extend(true,this.renderer,ai);this.renderer.options=ai;if(this.renderer.bandData.length>1&&(!ai.bands||ai.bands.show==null)){this.renderer.bands.show=true}else{if(ai.bands&&ai.bands.show==null&&ai.bands.interval!=null){this.renderer.bands.show=true}}if(this.fill){this.renderer.bands.show=false}if(this.renderer.bands.show){this.renderer.initBands.call(this,this.renderer.options,an)}if(this._stack){this.renderer.smooth=false}var am={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shapeRenderer.init(am);var aj=ai.shadowOffset;if(aj==null){if(this.lineWidth>2.5){aj=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{aj=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var ah={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,angle:this.shadowAngle,offset:aj,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shadowRenderer.init(ah);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill||this.renderer.bands.show){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(al.highlightMouseDown&&al.highlightMouseOver==null){al.highlightMouseOver=false}L.extend(true,this,{highlightMouseOver:al.highlightMouseOver,highlightMouseDown:al.highlightMouseDown,highlightColor:al.highlightColor});if(!this.highlightColor){var ak=(this.renderer.bands.show)?this.renderer.bands.fillColor:this.fillColor;this.highlightColor=L.jqplot.computeHighlightColors(ak)}if(this.highlighter){this.highlighter.show=false}}if(!this.isTrendline&&an){an.plugins.lineRenderer={};an.postInitHooks.addOnce(z);an.postDrawHooks.addOnce(af);an.eventListenerHooks.addOnce("jqplotMouseMove",h);an.eventListenerHooks.addOnce("jqplotMouseDown",e);an.eventListenerHooks.addOnce("jqplotMouseUp",ad);an.eventListenerHooks.addOnce("jqplotClick",g);an.eventListenerHooks.addOnce("jqplotRightClick",s)}};L.jqplot.LineRenderer.prototype.initBands=function(ak,av){var al=ak.bandData||[];var an=this.renderer.bands;an.hiData=[];an.lowData=[];var aB=this.data;an._max=null;an._min=null;if(al.length==2){if(L.isArray(al[0][0])){var ao;var ah=0,ar=0;for(var aw=0,at=al[0].length;awan._max)||an._max==null){an._max=ao[1]}if((ao[1]!=null&&ao[1]an._max)||an._max==null){an._max=ao[1];ar=1}if((ao[1]!=null&&ao[1]al[1][0])?0:1;var aC=(aj)?0:1;for(var aw=0,at=aB.length;aw2&&!L.isArray(al[0][0])){var aj=(al[0][0]>al[0][1])?0:1;var aC=(aj)?0:1;for(var aw=0,at=al.length;awan._max)||an._max==null){an._max=am[aw][1]}}for(var aw=0,at=ap.length;aw0){aR=Math.abs((ap[aQ][1]-ap[aQ-1][1])/(ap[aQ][0]-ap[aQ-1][0]))}am=aR/aG+aE;aM=aF*A(am)-aF*A(aE)+aS;aT=(aO+aM)/2}else{aT=aU}for(aK=0;aK2){var ao;if(this.renderer.constrainSmoothing){ao=J.call(this,this.gridData);this.renderer._smoothedData=ao[0];this.renderer._smoothedPlotData=ao[1];if(ak.show){ao=J.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ao[0];ao=J.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ao[0]}ao=null}else{ao=F.call(this,this.gridData);this.renderer._smoothedData=ao[0];this.renderer._smoothedPlotData=ao[1];if(ak.show){ao=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ao[0];ao=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ao[0]}ao=null}}};L.jqplot.LineRenderer.prototype.makeGridData=function(ao,aq){var am=this._xaxis.series_u2p;var ah=this._yaxis.series_u2p;var ar=[];var aj=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var al=this.renderer.bands;var ai=false;for(var an=0;an2){var ap;if(this.renderer.constrainSmoothing){ap=J.call(this,ar);this.renderer._smoothedData=ap[0];this.renderer._smoothedPlotData=ap[1];if(al.show){ap=J.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ap[0];ap=J.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ap[0]}ap=null}else{ap=F.call(this,ar);this.renderer._smoothedData=ap[0];this.renderer._smoothedPlotData=ap[1];if(al.show){ap=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ap[0];ap=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ap[0]}ap=null}}return ar};L.jqplot.LineRenderer.prototype.draw=function(ax,aI,ai,aB){var aC;var aq=L.extend(true,{},ai);var ak=(aq.shadow!=u)?aq.shadow:this.shadow;var aJ=(aq.showLine!=u)?aq.showLine:this.showLine;var aA=(aq.fill!=u)?aq.fill:this.fill;var ah=(aq.fillAndStroke!=u)?aq.fillAndStroke:this.fillAndStroke;var ar,ay,av,aE;ax.save();if(aI.length){if(aJ){if(aA){if(this.fillToZero){var aF=this.negativeColor;if(!this.useNegativeColors){aF=aq.fillStyle}var ao=false;var ap=aq.fillStyle;if(ah){var aH=aI.slice(0)}if(this.index==0||!this._stack){var aw=[];var aL=(this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var aG=this._yaxis.series_u2p(this.fillToValue);var aj=this._xaxis.series_u2p(this.fillToValue);aq.closePath=true;if(this.fillAxis=="y"){aw.push([aI[0][0],aG]);this._areaPoints.push([aI[0][0],aG]);for(var aC=0;aC0;aC--){aI.push(au[aC-1])}if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this._areaPoints=aI;this.renderer.shapeRenderer.draw(ax,aI,aq)}}else{if(ah){var aH=aI.slice(0)}if(this.index==0||!this._stack){var al=ax.canvas.height;aI.unshift([aI[0][0],al]);var aD=aI.length;aI.push([aI[aD-1][0],al])}else{var au=this._prevGridData;for(var aC=au.length;aC>0;aC--){aI.push(au[aC-1])}}this._areaPoints=aI;if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this.renderer.shapeRenderer.draw(ax,aI,aq)}if(ah){var az=L.extend(true,{},aq,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(ax,aH,az);if(this.markerRenderer.show){if(this.renderer.smooth){aH=this.gridData}for(aC=0;aCat[0]||ar==null){ar=at[0]}if(aEat[1]||ay==null){ay=at[1]}}if(this.type==="line"&&this.renderer.bands.show){aE=this._yaxis.series_u2p(this.renderer.bands._min);ay=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[ar,aE],[av,ay]];if(this.markerRenderer.show&&!aA){if(this.renderer.smooth){aI=this.gridData}for(aC=0;aCao){ao=aj}}}al=null;am=null;if(ah){ai=this._label._elem.outerWidth(true);an=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){ao=ao+an;this._elem.css({height:ao+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){ao=ao+an;this._elem.css({height:ao+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){ao=ao+ai;this._elem.css({width:ao+"px",left:"0px",top:"0px"});if(ah&&this._label.constructor==L.jqplot.AxisLabelRenderer){this._label._elem.css("width",ai+"px")}}else{ao=ao+ai;this._elem.css({width:ao+"px",right:"0px",top:"0px"});if(ah&&this._label.constructor==L.jqplot.AxisLabelRenderer){this._label._elem.css("width",ai+"px")}}}}}};L.jqplot.LinearAxisRenderer.prototype.createTicks=function(aj){var aT=this._ticks;var aK=this.ticks;var az=this.name;var aB=this._dataBounds;var ah=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;var an;var a6,aI;var ap,ao;var a4,a0;var aH=this.min;var a5=this.max;var aW=this.numberTicks;var ba=this.tickInterval;var am=30;this._scalefact=(Math.max(ah,am+1)-am)/300;if(aK.length){for(a0=0;a0this.breakPoints[0]&&aO[0]<=this.breakPoints[1]){aU.show=false;aU.showGridline=false;aU.label=aO[1]}else{aU.label=aO[1]}}}else{aU.label=aO[1]}aU.setTick(aO[0],this.name);this._ticks.push(aU)}else{if(L.isPlainObject(aO)){L.extend(true,aU,aO);aU.axis=this.name;this._ticks.push(aU)}else{aU.value=aO;if(this.breakPoints){if(aO==this.breakPoints[0]){aU.label=this.breakTickLabel;aU._breakTick=true;aU.showGridline=false;aU.showMark=false}else{if(aO>this.breakPoints[0]&&aO<=this.breakPoints[1]){aU.show=false;aU.showGridline=false}}}aU.setTick(aO,this.name);this._ticks.push(aU)}}}this.numberTicks=aK.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(az=="xaxis"||az=="x2axis"){ah=this._plotDimensions.width}else{ah=this._plotDimensions.height}var ax=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&aj.axes.xaxis.show){ax=aj.axes.xaxis.numberTicks}else{if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&aj.axes.yaxis.show){ax=aj.axes.yaxis.numberTicks}}}a6=((this.min!=null)?this.min:aB.min);aI=((this.max!=null)?this.max:aB.max);var av=aI-a6;var aS,ay;var at;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(this.min==null||this.max==null&&this.tickInterval==null&&!this.autoscale){if(this.forceTickAt0){if(a6>0){a6=0}if(aI<0){aI=0}}if(this.forceTickAt100){if(a6>100){a6=100}if(aI<100){aI=100}}var aE=false,a1=false;if(this.min!=null){aE=true}else{if(this.max!=null){a1=true}}var aP=L.jqplot.LinearTickGenerator(a6,aI,this._scalefact,ax,aE,a1);var aw=(this.min!=null)?a6:a6+av*(this.padMin-1);var aQ=(this.max!=null)?aI:aI-av*(this.padMax-1);if(a6aQ){aw=(this.min!=null)?a6:a6-av*(this.padMin-1);aQ=(this.max!=null)?aI:aI+av*(this.padMax-1);aP=L.jqplot.LinearTickGenerator(aw,aQ,this._scalefact,ax,aE,a1)}this.min=aP[0];this.max=aP[1];this.numberTicks=aP[2];this._autoFormatString=aP[3];this.tickInterval=aP[4]}else{if(a6==aI){var ai=0.05;if(a6>0){ai=Math.max(Math.log(a6)/Math.LN10,0.05)}a6-=ai;aI+=ai}if(this.autoscale&&this.min==null&&this.max==null){var ak,al,ar;var aC=false;var aN=false;var aA={min:null,max:null,average:null,stddev:null};for(var a0=0;a0a2){a2=aR[aZ]}}}var au=(a2-aG)/a2;if(aV.renderer.constructor==L.jqplot.BarRenderer){if(aG>=0&&(aV.fillToZero||au>0.1)){aC=true}else{aC=false;if(aV.fill&&aV.fillToZero&&aG<0&&a2>0){aN=true}else{aN=false}}}else{if(aV.fill){if(aG>=0&&(aV.fillToZero||au>0.1)){aC=true}else{if(aG<0&&a2>0&&aV.fillToZero){aC=false;aN=true}else{aC=false;aN=false}}}else{if(aG<0){aC=false}}}}}if(aC){this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing);this.min=0;aH=0;al=aI/(this.numberTicks-1);at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)));if(al/at==parseInt(al/at,10)){al+=at}this.tickInterval=Math.ceil(al/at)*at;this.max=this.tickInterval*(this.numberTicks-1)}else{if(aN){this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing);var aJ=Math.ceil(Math.abs(a6)/av*(this.numberTicks-1));var a9=this.numberTicks-1-aJ;al=Math.max(Math.abs(a6/aJ),Math.abs(aI/a9));at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)));this.tickInterval=Math.ceil(al/at)*at;this.max=this.tickInterval*a9;this.min=-this.tickInterval*aJ}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(av/this.tickInterval)}else{this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){al=av/(this.numberTicks-1);if(al<1){at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)))}else{at=1}this.tickInterval=Math.ceil(al*at*this.pad)/at}else{at=1/this.tickInterval}ak=this.tickInterval*(this.numberTicks-1);ar=(ak-av)/2;if(this.min==null){this.min=Math.floor(at*(a6-ar))/at}if(this.max==null){this.max=this.min+ak}}}var aF=L.jqplot.getSignificantFigures(this.tickInterval);var aM;if(aF.digitsLeft>=aF.significantDigits){aM="%d"}else{var at=Math.max(0,5-aF.digitsLeft);at=Math.min(at,aF.digitsRight);aM="%."+at+"f"}this._autoFormatString=aM}else{aS=(this.min!=null)?this.min:a6-av*(this.padMin-1);ay=(this.max!=null)?this.max:aI+av*(this.padMax-1);av=ay-aS;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((ay-aS)/this.tickInterval)+1}else{if(ah>100){this.numberTicks=parseInt(3+(ah-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=av/(this.numberTicks-1)}if(this.max==null){ay=aS+this.tickInterval*(this.numberTicks-1)}if(this.min==null){aS=ay-this.tickInterval*(this.numberTicks-1)}var aF=L.jqplot.getSignificantFigures(this.tickInterval);var aM;if(aF.digitsLeft>=aF.significantDigits){aM="%d"}else{var at=Math.max(0,5-aF.digitsLeft);at=Math.min(at,aF.digitsRight);aM="%."+at+"f"}this._autoFormatString=aM;this.min=aS;this.max=ay}if(this.renderer.constructor==L.jqplot.LinearAxisRenderer&&this._autoFormatString==""){av=this.max-this.min;var a7=new this.tickRenderer(this.tickOptions);var aL=a7.formatString||L.jqplot.config.defaultTickFormatString;var aL=aL.match(L.jqplot.sprintf.regex)[0];var a3=0;if(aL){if(aL.search(/[fFeEgGpP]/)>-1){var aY=aL.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(aY){a3=parseInt(aY[1],10)}else{a3=6}}else{if(aL.search(/[di]/)>-1){a3=0}}var aq=Math.pow(10,-a3);if(this.tickIntervalthis.breakPoints[0]&&aAthis.breakPoints[0]&&aAthis.breakPoints[0]&&aA=this.breakPoints[1]){return(aA-au)*ak/al}else{return(aA+this.breakPoints[1]-this.breakPoints[0]-au)*ak/al}};this.series_p2u=function(aA){return aA*al/ak+au}}}else{this.p2u=function(aA){return(aA-am)*al/ak+at};this.u2p=function(aA){return(aA-at)*ak/al+am};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(aA){return(aA-at)*ak/al};this.series_p2u=function(aA){return aA*al/ak+at}}else{this.series_u2p=function(aA){return(aA-au)*ak/al};this.series_p2u=function(aA){return aA*al/ak+au}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var av=0;av0){ah=-ap._textRenderer.height*Math.cos(-ap._textRenderer.angle)/2}else{ah=-ap.getHeight()+ap._textRenderer.height*Math.cos(ap._textRenderer.angle)/2}break;case"middle":ah=-ap.getHeight()/2;break;default:ah=-ap.getHeight()/2;break}}else{ah=-ap.getHeight()/2}var az=this.u2p(ap.value)+ah+"px";ap._elem.css("top",az);ap.pack()}}if(aq){var aw=this._label._elem.outerHeight(true);this._label._elem.css("top",ao-ak/2-aw/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}ay=null};function i(ai){var ah;ai=Math.abs(ai);if(ai>=10){ah="%d"}else{if(ai>1){if(ai===parseInt(ai,10)){ah="%d"}else{ah="%.1f"}}else{var aj=-Math.floor(Math.log(ai)/Math.LN10);ah="%."+aj+"f"}}return ah}var b=[0.1,0.2,0.3,0.4,0.5,0.8,1,2,3,4,5];var c=function(ai){var ah=b.indexOf(ai);if(ah>0){return b[ah-1]}else{return b[b.length-1]/100}};var k=function(ai){var ah=b.indexOf(ai);if(ah5){ah=10*aj}else{if(am>2){ah=5*aj}else{if(am>1){ah=2*aj}else{ah=aj}}}}else{if(am>5){ah=10*aj}else{if(am>4){ah=5*aj}else{if(am>3){ah=4*aj}else{if(am>2){ah=3*aj}else{if(am>1){ah=2*aj}else{ah=aj}}}}}}return ah}function Q(ai,ah){ah=ah||1;var ak=Math.floor(Math.log(ai)/Math.LN10);var am=Math.pow(10,ak);var al=ai/am;var aj;al=al/ah;if(al<=0.38){aj=0.1}else{if(al<=1.6){aj=0.2}else{if(al<=4){aj=0.5}else{if(al<=8){aj=1}else{if(al<=16){aj=2}else{aj=5}}}}}return aj*am}function x(aj,ai){var al=Math.floor(Math.log(aj)/Math.LN10);var an=Math.pow(10,al);var am=aj/an;var ah;var ak;am=am/ai;if(am<=0.38){ak=0.1}else{if(am<=1.6){ak=0.2}else{if(am<=4){ak=0.5}else{if(am<=8){ak=1}else{if(am<=16){ak=2}else{ak=5}}}}}ah=ak*an;return[ah,ak,an]}L.jqplot.LinearTickGenerator=function(an,aq,aj,ak,ao,ar){ao=(ao===null)?false:ao;ar=(ar===null||ao)?false:ar;if(an===aq){aq=(aq)?0:1}aj=aj||1;if(aqat){at=aB}if(ai>aA){aA=ai}})}an.width=at+Number(av);an.height=aA+Number(ax);var ak=an.getContext("2d");ak.save();ak.fillStyle=al;ak.fillRect(0,0,an.width,an.height);ak.restore();ak.translate(au,ar);ak.textAlign="left";ak.textBaseline="top";function aC(aE){var aF=parseInt(L(aE).css("line-height"),10);if(isNaN(aF)){aF=parseInt(L(aE).css("font-size"),10)*1.2}return aF}function aD(aF,aE,aS,aG,aO,aH){var aQ=aC(aF);var aK=L(aF).innerWidth();var aL=L(aF).innerHeight();var aN=aS.split(/\s+/);var aR=aN.length;var aP="";var aM=[];var aU=aO;var aT=aG;for(var aJ=0;aJaK){aM.push(aJ);aP="";aJ--}}if(aM.length===0){if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aS,aT,aO)}else{aP=aN.slice(0,aM[0]).join(" ");if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aP,aT,aU);aU+=aQ;for(var aJ=1,aI=aM.length;aJ0){ak.strokeRect(aI,aL,L(aG).innerWidth(),L(aG).innerHeight())}L(aG).find("div.jqplot-table-legend-swatch-outline").each(function(){var aU=L(this);ak.strokeStyle=aU.css("border-top-color");var aQ=aI+aU.position().left;var aR=aL+aU.position().top;ak.strokeRect(aQ,aR,aU.innerWidth(),aU.innerHeight());aQ+=parseInt(aU.css("padding-left"),10);aR+=parseInt(aU.css("padding-top"),10);var aT=aU.innerHeight()-2*parseInt(aU.css("padding-top"),10);var aP=aU.innerWidth()-2*parseInt(aU.css("padding-left"),10);var aS=aU.children("div.jqplot-table-legend-swatch");ak.fillStyle=aS.css("background-color");ak.fillRect(aQ,aR,aP,aT)});L(aG).find("td.jqplot-table-legend-label").each(function(){var aR=L(this);var aP=aI+aR.position().left;var aQ=aL+aR.position().top+parseInt(aR.css("padding-top"),10);ak.font=aR.jqplotGetComputedFontStyle();ak.fillStyle=aR.css("color");aD(aR,ak,aR.text(),aP,aQ,aM)});var aH=null}else{if(aN=="canvas"){ak.drawImage(aG,aI,aL)}}}}L(this).children().each(function(){aw(this,av,ax)});return an};L.fn.jqplotToImageStr=function(ai){var ah=L(this).jqplotToImageCanvas(ai);if(ah){return ah.toDataURL("image/png")}else{return null}};L.fn.jqplotToImageElem=function(ah){var ai=document.createElement("img");var aj=L(this).jqplotToImageStr(ah);ai.src=aj;return ai};L.fn.jqplotToImageElemStr=function(ah){var ai="";return ai};L.fn.jqplotSaveImage=function(){var ah=L(this).jqplotToImageStr({});if(ah){window.location.href=ah.replace("image/png","image/octet-stream")}};L.fn.jqplotViewImage=function(){var ai=L(this).jqplotToImageElemStr({});var aj=L(this).jqplotToImageStr({});if(ai){var ah=window.open("");ah.document.open("image/png");ah.document.write(ai);ah.document.close();ah=null}};var ag=function(){this.syntax=ag.config.syntax;this._type="jsDate";this.proxy=new Date();this.options={};this.locale=ag.regional.getLocale();this.formatString="";this.defaultCentury=ag.config.defaultCentury;switch(arguments.length){case 0:break;case 1:if(l(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var aj=this.options=arguments[0];this.syntax=aj.syntax||this.syntax;this.defaultCentury=aj.defaultCentury||this.defaultCentury;this.proxy=ag.createDate(aj.date)}else{this.proxy=ag.createDate(arguments[0])}break;default:var ah=[];for(var ai=0;ai0?"floor":"ceil"](ak))};ag.prototype.getAbbrDayName=function(){return ag.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]};ag.prototype.getAbbrMonthName=function(){return ag.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]};ag.prototype.getAMPM=function(){return this.proxy.getHours()>=12?"PM":"AM"};ag.prototype.getAmPm=function(){return this.proxy.getHours()>=12?"pm":"am"};ag.prototype.getCentury=function(){return parseInt(this.proxy.getFullYear()/100,10)};ag.prototype.getDate=function(){return this.proxy.getDate()};ag.prototype.getDay=function(){return this.proxy.getDay()};ag.prototype.getDayOfWeek=function(){var ah=this.proxy.getDay();return ah===0?7:ah};ag.prototype.getDayOfYear=function(){var ai=this.proxy;var ah=ai-new Date(""+ai.getFullYear()+"/1/1 GMT");ah+=ai.getTimezoneOffset()*60000;ai=null;return parseInt(ah/60000/60/24,10)+1};ag.prototype.getDayName=function(){return ag.regional[this.locale]["dayNames"][this.proxy.getDay()]};ag.prototype.getFullWeekOfYear=function(){var ak=this.proxy;var ah=this.getDayOfYear();var aj=6-ak.getDay();var ai=parseInt((ah+aj)/7,10);return ai};ag.prototype.getFullYear=function(){return this.proxy.getFullYear()};ag.prototype.getGmtOffset=function(){var ah=this.proxy.getTimezoneOffset()/60;var ai=ah<0?"+":"-";ah=Math.abs(ah);return ai+N(Math.floor(ah),2)+":"+N((ah%1)*60,2)};ag.prototype.getHours=function(){return this.proxy.getHours()};ag.prototype.getHours12=function(){var ah=this.proxy.getHours();return ah>12?ah-12:(ah==0?12:ah)};ag.prototype.getIsoWeek=function(){var ak=this.proxy;var aj=this.getWeekOfYear();var ah=(new Date(""+ak.getFullYear()+"/1/1")).getDay();var ai=aj+(ah>4||ah<=1?0:1);if(ai==53&&(new Date(""+ak.getFullYear()+"/12/31")).getDay()<4){ai=1}else{if(ai===0){ak=new ag(new Date(""+(ak.getFullYear()-1)+"/12/31"));ai=ak.getIsoWeek()}}ak=null;return ai};ag.prototype.getMilliseconds=function(){return this.proxy.getMilliseconds()};ag.prototype.getMinutes=function(){return this.proxy.getMinutes()};ag.prototype.getMonth=function(){return this.proxy.getMonth()};ag.prototype.getMonthName=function(){return ag.regional[this.locale]["monthNames"][this.proxy.getMonth()]};ag.prototype.getMonthNumber=function(){return this.proxy.getMonth()+1};ag.prototype.getSeconds=function(){return this.proxy.getSeconds()};ag.prototype.getShortYear=function(){return this.proxy.getYear()%100};ag.prototype.getTime=function(){return this.proxy.getTime()};ag.prototype.getTimezoneAbbr=function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/,"$1")};ag.prototype.getTimezoneName=function(){var ah=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return ah[1]||ah[2]||"GMT"+this.getGmtOffset()};ag.prototype.getTimezoneOffset=function(){return this.proxy.getTimezoneOffset()};ag.prototype.getWeekOfYear=function(){var ah=this.getDayOfYear();var aj=7-this.getDayOfWeek();var ai=parseInt((ah+aj)/7,10);return ai};ag.prototype.getUnix=function(){return Math.round(this.proxy.getTime()/1000,0)};ag.prototype.getYear=function(){return this.proxy.getYear()};ag.prototype.next=function(ah){ah=ah||"day";return this.clone().add(1,ah)};ag.prototype.set=function(){switch(arguments.length){case 0:this.proxy=new Date();break;case 1:if(l(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var aj=this.options=arguments[0];this.syntax=aj.syntax||this.syntax;this.defaultCentury=aj.defaultCentury||this.defaultCentury;this.proxy=ag.createDate(aj.date)}else{this.proxy=ag.createDate(arguments[0])}break;default:var ah=[];for(var ai=0;ai0?"floor":"ceil"](ah/12));var ai=aj.getMonth()+(ah%12);if(ai==12){ai=0;aj.setYear(aj.getFullYear()+1)}else{if(ai==-1){ai=11;aj.setYear(aj.getFullYear()-1)}}aj.setMonth(ai)},diff:function(al,aj){var ah=al.getFullYear()-aj.getFullYear();var ai=al.getMonth()-aj.getMonth()+(ah*12);var ak=al.getDate()-aj.getDate();return ai+(ak/30)}},year:{add:function(ai,ah){ai.setYear(ai.getFullYear()+Math[ah>0?"floor":"ceil"](ah))},diff:function(ai,ah){return E.month.diff(ai,ah)/12}}};for(var Y in E){if(Y.substring(Y.length-1)!="s"){E[Y+"s"]=E[Y]}}var H=function(al,ak,ai){if(ag.formats[ai]["shortcuts"][ak]){return ag.strftime(al,ag.formats[ai]["shortcuts"][ak],ai)}else{var ah=(ag.formats[ai]["codes"][ak]||"").split(".");var aj=al["get"+ah[0]]?al["get"+ah[0]]():"";if(ah[1]){aj=N(aj,ah[1])}return aj}};ag.strftime=function(an,ak,aj,ao){var ai="perl";var am=ag.regional.getLocale();if(aj&&ag.formats.hasOwnProperty(aj)){ai=aj}else{if(aj&&ag.regional.hasOwnProperty(aj)){am=aj}}if(ao&&ag.formats.hasOwnProperty(ao)){ai=ao}else{if(ao&&ag.regional.hasOwnProperty(ao)){am=ao}}if(l(an)!="[object Object]"||an._type!="jsDate"){an=new ag(an);an.locale=am}if(!ak){ak=an.formatString||ag.regional[am]["formatString"]}var ah=ak||"%Y-%m-%d",ap="",al;while(ah.length>0){if(al=ah.match(ag.formats[ai].codes.matcher)){ap+=ah.slice(0,al.index);ap+=(al[1]||"")+H(an,al[2],ai);ah=ah.slice(al.index+al[0].length)}else{ap+=ah;ah=""}}return ap};ag.formats={ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S"};ag.formats.perl={codes:{matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AMPM",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"},shortcuts:{F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};ag.formats.php={codes:{matcher:/()%((%|[a-z]))/i,a:"AbbrDayName",A:"DayName",d:"Date.2",e:"Date",j:"DayOfYear.3",u:"DayOfWeek",w:"Day",U:"FullWeekOfYear.2",V:"IsoWeek.2",W:"WeekOfYear.2",b:"AbbrMonthName",B:"MonthName",m:"MonthNumber.2",h:"AbbrMonthName",C:"Century.2",y:"ShortYear.2",Y:"FullYear",H:"Hours.2",I:"Hours12.2",l:"Hours12",p:"AMPM",P:"AmPm",M:"Minutes.2",S:"Seconds.2",s:"Unix",O:"TimezoneOffset",z:"GmtOffset",Z:"TimezoneAbbr"},shortcuts:{D:"%m/%d/%y",F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};ag.createDate=function(aj){if(aj==null){return new Date()}if(aj instanceof Date){return aj}if(typeof aj=="number"){return new Date(aj)}var ao=String(aj).replace(/^\s*(.+)\s*$/g,"$1");ao=ao.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/,"$1/$2/$3");ao=ao.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i,"$1 $2 $3");var an=ao.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);if(an&&an.length>3){var at=parseFloat(an[3]);var am=ag.config.defaultCentury+at;am=String(am);ao=ao.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i,an[1]+" "+an[2]+" "+am)}an=ao.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);function ar(ax,aw){var aC=parseFloat(aw[1]);var aB=parseFloat(aw[2]);var aA=parseFloat(aw[3]);var az=ag.config.defaultCentury;var av,au,aD,ay;if(aC>31){au=aA;aD=aB;av=az+aC}else{au=aB;aD=aC;av=az+aA}ay=aD+"/"+au+"/"+av;return ax.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/,ay)}if(an&&an.length>3){ao=ar(ao,an)}var an=ao.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);if(an&&an.length>3){ao=ar(ao,an)}var al=0;var ai=ag.matchers.length;var aq,ah,ap=ao,ak;while(al31){ah=an;ai=am+ao}else{ah=ao;ai=am+an}var ap=ab(aj[2],ag.regional[ag.regional.getLocale()]["monthNamesShort"]);if(ap==-1){ap=ab(aj[2],ag.regional[ag.regional.getLocale()]["monthNames"])}ak.setFullYear(ai,ap,ah);ak.setHours(0,0,0,0);return ak}else{return al}}];function ab(aj,ak){if(ak.indexOf){return ak.indexOf(aj)}for(var ah=0,ai=ak.length;ah=ap)?"":Array(1+ap-au.length>>>0).join(aq);return at?au+ar:ar+au}function ak(ar){var aq=new String(ar);for(var ap=10;ap>0;ap--){if(aq==(aq=aq.replace(/^(\d+)(\d{3})/,"$1"+L.jqplot.sprintf.thousandsSeparator+"$2"))){break}}return aq}function aj(av,au,ax,ar,at,aq){var aw=ar-av.length;if(aw>0){var ap=" ";if(aq){ap=" "}if(ax||!at){av=an(av,ar,ap,ax)}else{av=av.slice(0,au.length)+an("",aw,"0",true)+av.slice(au.length)}}return av}function ao(ay,aq,aw,ar,ap,av,ax,au){var at=ay>>>0;aw=aw&&at&&{"2":"0b","8":"0","16":"0x"}[aq]||"";ay=aw+an(at.toString(aq),av||0,"0",false);return aj(ay,aw,ar,ap,ax,au)}function ah(au,av,ar,ap,at,aq){if(ap!=null){au=au.slice(0,ap)}return aj(au,"",av,ar,at,aq)}var ai=arguments,al=0,am=ai[al++];return am.replace(L.jqplot.sprintf.regex,function(aM,ax,ay,aB,aO,aJ,av){if(aM=="%%"){return"%"}var aD=false,az="",aA=false,aL=false,aw=false,au=false;for(var aI=0;ay&&aI-1?6:(av=="d")?0:void (0)}else{if(aJ=="*"){aJ=+ai[al++]}else{if(aJ.charAt(0)=="*"){aJ=+ai[aJ.slice(1,-1)]}else{aJ=+aJ}}}var aF=ax?ai[ax.slice(0,-1)]:ai[al++];switch(av){case"s":if(aF==null){return""}return ah(String(aF),aD,aB,aJ,aA,aw);case"c":return ah(String.fromCharCode(+aF),aD,aB,aJ,aA,aw);case"b":return ao(aF,2,aL,aD,aB,aJ,aA,aw);case"o":return ao(aF,8,aL,aD,aB,aJ,aA,aw);case"x":return ao(aF,16,aL,aD,aB,aJ,aA,aw);case"X":return ao(aF,16,aL,aD,aB,aJ,aA,aw).toUpperCase();case"u":return ao(aF,10,aL,aD,aB,aJ,aA,aw);case"i":var ar=parseInt(+aF,10);if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aK=au?ak(String(Math.abs(ar))):String(Math.abs(ar));aF=aH+an(aK,aJ,"0",false);return aj(aF,aH,aD,aB,aA,aw);case"d":var ar=Math.round(+aF);if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aK=au?ak(String(Math.abs(ar))):String(Math.abs(ar));aF=aH+an(aK,aJ,"0",false);return aj(aF,aH,aD,aB,aA,aw);case"e":case"E":case"f":case"F":case"g":case"G":var ar=+aF;if(isNaN(ar)){return""}var aH=ar<0?"-":az;var at=["toExponential","toFixed","toPrecision"]["efg".indexOf(av.toLowerCase())];var aN=["toString","toUpperCase"]["eEfFgG".indexOf(av)%2];var aK=Math.abs(ar)[at](aJ);var aE=aK.toString().split(".");aE[0]=au?ak(aE[0]):aE[0];aK=aE.join(L.jqplot.sprintf.decimalMark);aF=aH+aK;var aC=aj(aF,aH,aD,aB,aA,aw)[aN]();return aC;case"p":case"P":var ar=+aF;if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aE=String(Number(Math.abs(ar)).toExponential()).split(/e|E/);var aq=(aE[0].indexOf(".")!=-1)?aE[0].length-1:String(ar).length;var aG=(aE[1]<0)?-aE[1]-1:0;if(Math.abs(ar)<1){if(aq+aG<=aJ){aF=aH+Math.abs(ar).toPrecision(aq)}else{if(aq<=aJ-1){aF=aH+Math.abs(ar).toExponential(aq-1)}else{aF=aH+Math.abs(ar).toExponential(aJ-1)}}}else{var ap=(aq<=aJ)?aq:aJ;aF=aH+Math.abs(ar).toPrecision(ap)}var aN=["toString","toUpperCase"]["pP".indexOf(av)%2];return aj(aF,aH,aD,aB,aA,aw)[aN]();case"n":return"";default:return aM}})};L.jqplot.sprintf.thousandsSeparator=",";L.jqplot.sprintf.decimalMark=".";L.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;L.jqplot.getSignificantFigures=function(al){var an=String(Number(Math.abs(al)).toExponential()).split(/e|E/);var am=(an[0].indexOf(".")!=-1)?an[0].length-1:an[0].length;var ai=(an[1]<0)?-an[1]-1:0;var ah=parseInt(an[1],10);var aj=(ah+1>0)?ah+1:0;var ak=(am<=aj)?0:am-ah-1;return{significantDigits:am,digitsLeft:aj,digitsRight:ak,zeros:ai,exponent:ah}};L.jqplot.getPrecision=function(ah){return L.jqplot.getSignificantFigures(ah).digitsRight};var X=L.uiBackCompat!==false;L.jqplot.effects={effect:{}};var m="jqplot.storage.";L.extend(L.jqplot.effects,{version:"1.9pre",save:function(ai,aj){for(var ah=0;ah").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),ah={width:ai.width(),height:ai.height()},ak=document.activeElement;ai.wrap(al);if(ai[0]===ak||L.contains(ai[0],ak)){L(ak).focus()}al=ai.parent();if(ai.css("position")==="static"){al.css({position:"relative"});ai.css({position:"relative"})}else{L.extend(aj,{position:ai.css("position"),zIndex:ai.css("z-index")});L.each(["top","left","bottom","right"],function(am,an){aj[an]=ai.css(an);if(isNaN(parseInt(aj[an],10))){aj[an]="auto"}});ai.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}ai.css(ah);return al.css(aj).show()},removeWrapper:function(ah){var ai=document.activeElement;if(ah.parent().is(".ui-effects-wrapper")){ah.parent().replaceWith(ah);if(ah[0]===ai||L.contains(ah[0],ai)){L(ai).focus()}}return ah}});function j(ai,ah,aj,ak){if(L.isPlainObject(ai)){return ai}ai={effect:ai};if(ah===u){ah={}}if(L.isFunction(ah)){ak=ah;aj=null;ah={}}if(L.type(ah)==="number"||L.fx.speeds[ah]){ak=aj;aj=ah;ah={}}if(L.isFunction(aj)){ak=aj;aj=null}if(ah){L.extend(ai,ah)}aj=aj||ah.duration;ai.duration=L.fx.off?0:typeof aj==="number"?aj:aj in L.fx.speeds?L.fx.speeds[aj]:L.fx.speeds._default;ai.complete=ak||ah.complete;return ai}function ae(ah){if(!ah||typeof ah==="number"||L.fx.speeds[ah]){return true}if(typeof ah==="string"&&!L.jqplot.effects.effect[ah]){if(X&&L.jqplot.effects[ah]){return false}return true}return false}L.fn.extend({jqplotEffect:function(ap,aq,ai,ao){var an=j.apply(this,arguments),ak=an.mode,al=an.queue,am=L.jqplot.effects.effect[an.effect],ah=!am&&X&&L.jqplot.effects[an.effect];if(L.fx.off||!(am||ah)){if(ak){return this[ak](an.duration,an.complete)}else{return this.each(function(){if(an.complete){an.complete.call(this)}})}}function aj(au){var av=L(this),at=an.complete,aw=an.mode;function ar(){if(L.isFunction(at)){at.call(av[0])}if(L.isFunction(au)){au()}}if(av.is(":hidden")?aw==="hide":aw==="show"){ar()}else{am.call(av[0],an,ar)}}if(am){return al===false?this.each(aj):this.queue(al||"fx",aj)}else{return ah.call(this,{options:an,duration:an.duration,callback:an.complete,mode:an.mode})}}});var a=/up|down|vertical/,v=/up|left|vertical|horizontal/;L.jqplot.effects.effect.blind=function(aj,ao){var ak=L(this),ar=["position","top","bottom","left","right","height","width"],ap=L.jqplot.effects.setMode(ak,aj.mode||"hide"),au=aj.direction||"up",am=a.test(au),al=am?"height":"width",aq=am?"top":"left",aw=v.test(au),an={},av=ap==="show",ai,ah,at;if(ak.parent().is(".ui-effects-wrapper")){L.jqplot.effects.save(ak.parent(),ar)}else{L.jqplot.effects.save(ak,ar)}ak.show();at=parseInt(ak.css("top"),10);ai=L.jqplot.effects.createWrapper(ak).css({overflow:"hidden"});ah=am?ai[al]()+at:ai[al]();an[al]=av?String(ah):"0";if(!aw){ak.css(am?"bottom":"right",0).css(am?"top":"left","").css({position:"absolute"});an[aq]=av?"0":String(ah)}if(av){ai.css(al,0);if(!aw){ai.css(aq,ah)}}ai.animate(an,{duration:aj.duration,easing:aj.easing,queue:false,complete:function(){if(ap==="hide"){ak.hide()}L.jqplot.effects.restore(ak,ar);L.jqplot.effects.removeWrapper(ak);ao()}})}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.BezierCurveRenderer.min.js b/docs/js/jqplot/plugins/jqplot.BezierCurveRenderer.min.js deleted file mode 100644 index fb36057..0000000 --- a/docs/js/jqplot/plugins/jqplot.BezierCurveRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(b){b.jqplot.BezierCurveRenderer=function(){b.jqplot.LineRenderer.call(this)};b.jqplot.BezierCurveRenderer.prototype=new b.jqplot.LineRenderer();b.jqplot.BezierCurveRenderer.prototype.constructor=b.jqplot.BezierCurveRenderer;b.jqplot.BezierCurveRenderer.prototype.setGridData=function(h){var e=this._xaxis.series_u2p;var g=this._yaxis.series_u2p;var f=this.data;this.gridData=[];this._prevGridData=[];var d=this.index;if(f.length==2){if(d==0){this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[1][2]),g.call(this._yaxis,f[1][3]),e.call(this._xaxis,f[1][4]),g.call(this._yaxis,f[1][5])],[e.call(this._xaxis,f[1][4]),g.call(this._yaxis,this._yaxis.min)],[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,this._yaxis.min)]]}else{var c=h.series[d-1].data;this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[1][2]),g.call(this._yaxis,f[1][3]),e.call(this._xaxis,f[1][4]),g.call(this._yaxis,f[1][5])],[e.call(this._xaxis,c[1][4]),g.call(this._yaxis,c[1][5])],[e.call(this._xaxis,c[1][2]),g.call(this._yaxis,c[1][3]),e.call(this._xaxis,c[1][0]),g.call(this._yaxis,c[1][1]),e.call(this._xaxis,c[0][0]),g.call(this._yaxis,c[0][1])]]}}else{if(d==0){this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[2][0]),g.call(this._yaxis,f[2][1]),e.call(this._xaxis,f[3][0]),g.call(this._yaxis,f[3][1])],[e.call(this._xaxis,f[3][1]),g.call(this._yaxis,this._yaxis.min)],[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,this._yaxis.min)]]}else{var c=h.series[d-1].data;this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[2][0]),g.call(this._yaxis,f[2][1]),e.call(this._xaxis,f[3][0]),g.call(this._yaxis,f[3][1])],[e.call(this._xaxis,c[3][0]),g.call(this._yaxis,c[3][1])],[e.call(this._xaxis,c[2][0]),g.call(this._yaxis,c[2][1]),e.call(this._xaxis,c[1][0]),g.call(this._yaxis,c[1][1]),e.call(this._xaxis,c[0][0]),g.call(this._yaxis,c[0][1])]]}}};b.jqplot.BezierCurveRenderer.prototype.makeGridData=function(g,i){var f=this._xaxis.series_u2p;var h=this._yaxis.series_u2p;var e=[];var j=[];var d=this.index;if(g.length==2){if(d==0){e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[1][2]),h.call(this._yaxis,g[1][3]),f.call(this._xaxis,g[1][4]),h.call(this._yaxis,g[1][5])],[f.call(this._xaxis,g[1][4]),h.call(this._yaxis,this._yaxis.min)],[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,this._yaxis.min)]]}else{var c=i.series[d-1].data;e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[1][2]),h.call(this._yaxis,g[1][3]),f.call(this._xaxis,g[1][4]),h.call(this._yaxis,g[1][5])],[f.call(this._xaxis,c[1][4]),h.call(this._yaxis,c[1][5])],[f.call(this._xaxis,c[1][2]),h.call(this._yaxis,c[1][3]),f.call(this._xaxis,c[1][0]),h.call(this._yaxis,c[1][1]),f.call(this._xaxis,c[0][0]),h.call(this._yaxis,c[0][1])]]}}else{if(d==0){e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[2][0]),h.call(this._yaxis,g[2][1]),f.call(this._xaxis,g[3][0]),h.call(this._yaxis,g[3][1])],[f.call(this._xaxis,g[3][1]),h.call(this._yaxis,this._yaxis.min)],[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,this._yaxis.min)]]}else{var c=i.series[d-1].data;e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[2][0]),h.call(this._yaxis,g[2][1]),f.call(this._xaxis,g[3][0]),h.call(this._yaxis,g[3][1])],[f.call(this._xaxis,c[3][0]),h.call(this._yaxis,c[3][1])],[f.call(this._xaxis,c[2][0]),h.call(this._yaxis,c[2][1]),f.call(this._xaxis,c[1][0]),h.call(this._yaxis,c[1][1]),f.call(this._xaxis,c[0][0]),h.call(this._yaxis,c[0][1])]]}}return e};b.jqplot.BezierCurveRenderer.prototype.draw=function(c,g,d){var e;c.save();if(g.length){if(this.showLine){c.save();var f=(d!=null)?d:{};c.fillStyle=f.fillStyle||this.color;c.beginPath();c.moveTo(g[0][0],g[0][1]);c.bezierCurveTo(g[1][0],g[1][1],g[1][2],g[1][3],g[1][4],g[1][5]);c.lineTo(g[2][0],g[2][1]);if(g[3].length==2){c.lineTo(g[3][0],g[3][1])}else{c.bezierCurveTo(g[3][0],g[3][1],g[3][2],g[3][3],g[3][4],g[3][5])}c.closePath();c.fill();c.restore()}}c.restore()};b.jqplot.BezierCurveRenderer.prototype.drawShadow=function(c,e,d){};b.jqplot.BezierAxisRenderer=function(){b.jqplot.LinearAxisRenderer.call(this)};b.jqplot.BezierAxisRenderer.prototype=new b.jqplot.LinearAxisRenderer();b.jqplot.BezierAxisRenderer.prototype.constructor=b.jqplot.BezierAxisRenderer;b.jqplot.BezierAxisRenderer.prototype.init=function(f){b.extend(true,this,f);var c=this._dataBounds;for(var g=0;gc.max||c.max==null){c.max=k[e][0]}}else{if(k[e][1]c.max||c.max==null){c.max=k[e][1]}}}}else{if(this.name=="xaxis"||this.name=="x2axis"){if(k[0][0]c.max||c.max==null){c.max=k[0][0]}for(var e=0;e<5;e+=2){if(k[1][e]c.max||c.max==null){c.max=k[1][e]}}}else{if(k[0][1]c.max||c.max==null){c.max=k[0][1]}for(var e=1;e<6;e+=2){if(k[1][e]c.max||c.max==null){c.max=k[1][e]}}}}}};function a(g,f,d){d=d||{};d.axesDefaults=b.extend(true,{pad:0},d.axesDefaults);d.seriesDefaults=d.seriesDefaults||{};d.legend=b.extend(true,{placement:"outside"},d.legend);var c=false;if(d.seriesDefaults.renderer==b.jqplot.BezierCurveRenderer){c=true}else{if(d.series){for(var e=0;e0){this.data[q][u]+=this.data[q-1][u]}}this.data[this.data.length]=(u==1)?[this.data.length+1,s]:[s,this.data.length+1];this._data[this._data.length]=(u==1)?[this._data.length+1,s]:[s,this._data.length+1]}if(this.rendererOptions.groups>1){this.breakOnNull=true;var n=this.data.length;var v=parseInt(n/this.rendererOptions.groups,10);var r=0;for(var q=v;q570)?n[p]*0.8:n[p]+0.3*(255-n[p]);n[p]=parseInt(n[p],10)}q.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}return q}function i(v,u,s,t,o){var q=v,w=v-1,n,p,r=(o==="x")?0:1;if(q>0){p=t.series[w]._plotData[u][r];if((s*p)<0){n=i(w,u,s,t,o)}else{n=t.series[w].gridData[u][r]}}else{n=(r===0)?t.series[q]._xaxis.series_u2p(0):t.series[q]._yaxis.series_u2p(0)}return n}d.jqplot.BarRenderer.prototype.draw=function(E,L,q,G){var I;var A=d.extend({},q);var w=(A.shadow!=undefined)?A.shadow:this.shadow;var O=(A.showLine!=undefined)?A.showLine:this.showLine;var F=(A.fill!=undefined)?A.fill:this.fill;var p=this.xaxis;var J=this.yaxis;var y=this._xaxis.series_u2p;var K=this._yaxis.series_u2p;var D,C;this._dataColors=[];this._barPoints=[];if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var N=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);var x=N[0];var v=N[1];var s=N[2];var H=[];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(v/2-0.5)+s)*(this.barWidth+this.barPadding)}if(O){var u=new d.jqplot.ColorGenerator(this.negativeSeriesColors);var B=new d.jqplot.ColorGenerator(this.seriesColors);var M=u.get(this.index);if(!this.useNegativeColors){M=A.fillStyle}var t=A.fillStyle;var r;var P;var o;if(this.barDirection=="vertical"){for(var I=0;I0&&I=0){o=this._yaxis.series_u2p(0)}else{if(this._yaxis.min>0){o=E.canvas.height}else{o=0}}}else{if(this.waterfall&&I==this.gridData.length-1){if(this._yaxis.min<=0&&this._yaxis.max>=0){o=this._yaxis.series_u2p(0)}else{if(this._yaxis.min>0){o=E.canvas.height}else{o=0}}}else{o=E.canvas.height}}}}}if((this.fillToZero&&this._plotData[I][1]<0)||(this.waterfall&&this._data[I][1]<0)){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){A.fillStyle=u.next()}else{A.fillStyle=B.next()}}else{A.fillStyle=M}}else{if(this.varyBarColor&&!this._stack){A.fillStyle=B.next()}else{A.fillStyle=t}}if(!this.fillToZero||this._plotData[I][1]>=0){H.push([r-this.barWidth/2,o]);H.push([r-this.barWidth/2,L[I][1]]);H.push([r+this.barWidth/2,L[I][1]]);H.push([r+this.barWidth/2,o])}else{H.push([r-this.barWidth/2,L[I][1]]);H.push([r-this.barWidth/2,o]);H.push([r+this.barWidth/2,o]);H.push([r+this.barWidth/2,L[I][1]])}this._barPoints.push(H);if(w&&!this._stack){var z=d.extend(true,{},A);delete z.fillStyle;this.renderer.shadowRenderer.draw(E,H,z)}var n=A.fillStyle||this.color;this._dataColors.push(n);this.renderer.shapeRenderer.draw(E,H,A)}}else{if(this.barDirection=="horizontal"){for(var I=0;I0&&I=0){P=this._xaxis.series_u2p(0)}else{if(this._xaxis.min>0){P=0}else{P=0}}}else{if(this.waterfall&&I==this.gridData.length-1){if(this._xaxis.min<=0&&this._xaxis.max>=0){P=this._xaxis.series_u2p(0)}else{if(this._xaxis.min>0){P=0}else{P=E.canvas.width}}}else{P=0}}}}}if((this.fillToZero&&this._plotData[I][0]<0)||(this.waterfall&&this._data[I][0]<0)){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){A.fillStyle=u.next()}else{A.fillStyle=B.next()}}else{A.fillStyle=M}}else{if(this.varyBarColor&&!this._stack){A.fillStyle=B.next()}else{A.fillStyle=t}}if(!this.fillToZero||this._plotData[I][0]>=0){H.push([P,r+this.barWidth/2]);H.push([P,r-this.barWidth/2]);H.push([L[I][0],r-this.barWidth/2]);H.push([L[I][0],r+this.barWidth/2])}else{H.push([L[I][0],r+this.barWidth/2]);H.push([L[I][0],r-this.barWidth/2]);H.push([P,r-this.barWidth/2]);H.push([P,r+this.barWidth/2])}this._barPoints.push(H);if(w&&!this._stack){var z=d.extend(true,{},A);delete z.fillStyle;this.renderer.shadowRenderer.draw(E,H,z)}var n=A.fillStyle||this.color;this._dataColors.push(n);this.renderer.shapeRenderer.draw(E,H,A)}}}}if(this.highlightColors.length==0){this.highlightColors=d.jqplot.computeHighlightColors(this._dataColors)}else{if(typeof(this.highlightColors)=="string"){var N=this.highlightColors;this.highlightColors=[];for(var I=0;I")}k=a.extend(true,{},this.css,k);c=a('
');this.canvas._elem.append(c);this.escapeHtml?c.text(p):c.html(p);delete k.position;delete k.marginRight;delete k.marginLeft;if(!k.background&&!k.backgroundColor&&!k.backgroundImage){k.background=j.next()}c.css(k);n=c.outerWidth();g=c.outerHeight();e=o[0]-n/2+"px";m=o[1]-g/2+"px";c.css({left:e,top:m});c=null}};a.jqplot.BlockCanvas=function(){a.jqplot.ElemContainer.call(this);this._ctx};a.jqplot.BlockCanvas.prototype=new a.jqplot.ElemContainer();a.jqplot.BlockCanvas.prototype.constructor=a.jqplot.BlockCanvas;a.jqplot.BlockCanvas.prototype.createElement=function(i,e,c){this._offsets=i;var b="jqplot-blockCanvas";if(e!=undefined){b=e}var g;if(this._elem){g=this._elem.get(0)}else{g=document.createElement("div")}if(c!=undefined){this._plotDimensions=c}var d=this._plotDimensions.width-this._offsets.left-this._offsets.right+"px";var f=this._plotDimensions.height-this._offsets.top-this._offsets.bottom+"px";this._elem=a(g);this._elem.css({position:"absolute",width:d,height:f,left:this._offsets.left,top:this._offsets.top});this._elem.addClass(b);return this._elem};a.jqplot.BlockCanvas.prototype.setContext=function(){this._ctx={canvas:{width:0,height:0},clearRect:function(){return null}};return this._ctx}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.bubbleRenderer.min.js b/docs/js/jqplot/plugins/jqplot.bubbleRenderer.min.js deleted file mode 100644 index d44a7cd..0000000 --- a/docs/js/jqplot/plugins/jqplot.bubbleRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(f){var d=function(m){return Math.max.apply(Math,m)};var j=function(m){return Math.min.apply(Math,m)};f.jqplot.BubbleRenderer=function(){f.jqplot.LineRenderer.call(this)};f.jqplot.BubbleRenderer.prototype=new f.jqplot.LineRenderer();f.jqplot.BubbleRenderer.prototype.constructor=f.jqplot.BubbleRenderer;f.jqplot.BubbleRenderer.prototype.init=function(w,t){this.varyBubbleColors=true;this.autoscaleBubbles=true;this.autoscaleMultiplier=1;this.autoscalePointsFactor=-0.07;this.escapeHtml=true;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.bubbleAlpha=1;this.highlightAlpha=null;this.bubbleGradients=false;this.showLabels=true;this.radii=[];this.maxRadius=0;this._highlightedPoint=null;this.labels=[];this.bubbleCanvases=[];this._type="bubble";if(w.highlightMouseDown&&w.highlightMouseOver==null){w.highlightMouseOver=false}f.extend(true,this,w);if(this.highlightAlpha==null){this.highlightAlpha=this.bubbleAlpha;if(this.bubbleGradients){this.highlightAlpha=0.35}}this.autoscaleMultiplier=this.autoscaleMultiplier*Math.pow(this.data.length,this.autoscalePointsFactor);this._highlightedPoint=null;var n;for(var r=0;r570)?u[q]*0.8:u[q]+0.3*(255-u[q]);u[q]=parseInt(u[q],10)}this.highlightColors.push("rgba("+u[0]+","+u[1]+","+u[2]+", "+this.highlightAlpha+")")}}this.highlightColorGenerator=new f.jqplot.ColorGenerator(this.highlightColors);var m={fill:true,isarc:true,angle:this.shadowAngle,alpha:this.shadowAlpha,closePath:true};this.renderer.shadowRenderer.init(m);this.canvas=new f.jqplot.DivCanvas();this.canvas._plotDimensions=this._plotDimensions;t.eventListenerHooks.addOnce("jqplotMouseMove",a);t.eventListenerHooks.addOnce("jqplotMouseDown",b);t.eventListenerHooks.addOnce("jqplotMouseUp",k);t.eventListenerHooks.addOnce("jqplotClick",g);t.eventListenerHooks.addOnce("jqplotRightClick",l);t.postDrawHooks.addOnce(h)};f.jqplot.BubbleRenderer.prototype.setGridData=function(w){var q=this._xaxis.series_u2p;var m=this._yaxis.series_u2p;var t=this._plotData;this.gridData=[];var s=[];this.radii=[];var v=Math.min(w._height,w._width);for(var u=0;u');if(this.escapeHtml){p.text(z)}else{p.html(z)}this.canvas._elem.append(p);var H=f(p).outerHeight();var v=f(p).outerWidth();var B=J[1]-0.5*H;var o=J[0]-0.5*v;p.css({top:B,left:o});this.labels[C]=f(p)}}};f.jqplot.DivCanvas=function(){f.jqplot.ElemContainer.call(this);this._ctx};f.jqplot.DivCanvas.prototype=new f.jqplot.ElemContainer();f.jqplot.DivCanvas.prototype.constructor=f.jqplot.DivCanvas;f.jqplot.DivCanvas.prototype.createElement=function(s,p,n){this._offsets=s;var m="jqplot-DivCanvas";if(p!=undefined){m=p}var r;if(this._elem){r=this._elem.get(0)}else{r=document.createElement("div")}if(n!=undefined){this._plotDimensions=n}var o=this._plotDimensions.width-this._offsets.left-this._offsets.right+"px";var q=this._plotDimensions.height-this._offsets.top-this._offsets.bottom+"px";this._elem=f(r);this._elem.css({position:"absolute",width:o,height:q,left:this._offsets.left,top:this._offsets.top});this._elem.addClass(m);return this._elem};f.jqplot.DivCanvas.prototype.setContext=function(){this._ctx={canvas:{width:0,height:0},clearRect:function(){return null}};return this._ctx};f.jqplot.BubbleCanvas=function(){f.jqplot.ElemContainer.call(this);this._ctx};f.jqplot.BubbleCanvas.prototype=new f.jqplot.ElemContainer();f.jqplot.BubbleCanvas.prototype.constructor=f.jqplot.BubbleCanvas;f.jqplot.BubbleCanvas.prototype.createElement=function(n,u,s){var m="jqplot-bubble-point";var q;if(this._elem){q=this._elem.get(0)}else{q=document.createElement("canvas")}q.width=(s!=null)?2*s:q.width;q.height=(s!=null)?2*s:q.height;this._elem=f(q);var o=(n!=null&&s!=null)?n-s:this._elem.css("left");var p=(u!=null&&s!=null)?u-s:this._elem.css("top");this._elem.css({position:"absolute",left:o,top:p});this._elem.addClass(m);if(f.jqplot.use_excanvas){window.G_vmlCanvasManager.init_(document);q=window.G_vmlCanvasManager.initElement(q)}return this._elem};f.jqplot.BubbleCanvas.prototype.draw=function(m,s,v,p){var D=this._ctx;var B=D.canvas.width/2;var z=D.canvas.height/2;D.save();if(v&&!f.jqplot.use_excanvas){m=m*1.04;var o=f.jqplot.getColorComponents(s);var u="rgba("+Math.round(o[0]+0.8*(255-o[0]))+", "+Math.round(o[1]+0.8*(255-o[1]))+", "+Math.round(o[2]+0.8*(255-o[2]))+", "+o[3]+")";var t="rgba("+o[0]+", "+o[1]+", "+o[2]+", 0)";var C=0.35*m;var A=B-Math.cos(p)*0.33*m;var n=z-Math.sin(p)*0.33*m;var w=D.createRadialGradient(A,n,C,B,z,m);w.addColorStop(0,u);w.addColorStop(0.93,s);w.addColorStop(0.96,t);w.addColorStop(1,t);D.fillStyle=w;D.fillRect(0,0,D.canvas.width,D.canvas.height)}else{D.fillStyle=s;D.strokeStyle=s;D.lineWidth=1;D.beginPath();var q=2*Math.PI;D.arc(B,z,m,0,q,0);D.closePath();D.fill()}D.restore()};f.jqplot.BubbleCanvas.prototype.setContext=function(){this._ctx=this._elem.get(0).getContext("2d");return this._ctx};f.jqplot.BubbleAxisRenderer=function(){f.jqplot.LinearAxisRenderer.call(this)};f.jqplot.BubbleAxisRenderer.prototype=new f.jqplot.LinearAxisRenderer();f.jqplot.BubbleAxisRenderer.prototype.constructor=f.jqplot.BubbleAxisRenderer;f.jqplot.BubbleAxisRenderer.prototype.init=function(n){f.extend(true,this,n);var I=this._dataBounds;var H=0,v=0,m=0,y=0,q=0,r=0,D=0,t=0,F=0,z=0;for(var E=0;EI.max||I.max==null){I.max=G[B][0];m=E;y=B;q=G[B][2];t=x.maxRadius;F=x.autoscaleMultiplier}}else{if(G[B][1]I.max||I.max==null){I.max=G[B][1];m=E;y=B;q=G[B][2];t=x.maxRadius;F=x.autoscaleMultiplier}}}}var o=r/D;var w=q/t;var C=I.max-I.min;var A=Math.min(this._plotDimensions.width,this._plotDimensions.height);var p=o*z/3*C;var u=w*F/3*C;I.max+=u;I.min-=p};function e(p,v,q){p.plugins.bubbleRenderer.highlightLabelCanvas.empty();var z=p.series[v];var n=p.plugins.bubbleRenderer.highlightCanvas;var w=n._ctx;w.clearRect(0,0,w.canvas.width,w.canvas.height);z._highlightedPoint=q;p.plugins.bubbleRenderer.highlightedSeriesIndex=v;var o=z.highlightColorGenerator.get(q);var u=z.gridData[q][0],t=z.gridData[q][1],m=z.gridData[q][2];w.save();w.fillStyle=o;w.strokeStyle=o;w.lineWidth=1;w.beginPath();w.arc(u,t,m,0,2*Math.PI,0);w.closePath();w.fill();w.restore();if(z.labels[q]){p.plugins.bubbleRenderer.highlightLabel=z.labels[q].clone();p.plugins.bubbleRenderer.highlightLabel.appendTo(p.plugins.bubbleRenderer.highlightLabelCanvas);p.plugins.bubbleRenderer.highlightLabel.addClass("jqplot-bubble-label-highlight")}}function i(p){var m=p.plugins.bubbleRenderer.highlightCanvas;var o=p.plugins.bubbleRenderer.highlightedSeriesIndex;p.plugins.bubbleRenderer.highlightLabelCanvas.empty();m._ctx.clearRect(0,0,m._ctx.canvas.width,m._ctx.canvas.height);for(var n=0;n');var q=this._gridPadding.top;var p=this._gridPadding.left;var n=this._plotDimensions.width-this._gridPadding.left-this._gridPadding.right;var m=this._plotDimensions.height-this._gridPadding.top-this._gridPadding.bottom;this.plugins.bubbleRenderer.highlightLabelCanvas.css({top:q,left:p,width:n+"px",height:m+"px"});this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-bubbleRenderer-highlight-canvas",this._plotDimensions,this));this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightLabelCanvas);var o=this.plugins.bubbleRenderer.highlightCanvas.setContext()}function c(q,p,n){n=n||{};n.axesDefaults=n.axesDefaults||{};n.seriesDefaults=n.seriesDefaults||{};var m=false;if(n.seriesDefaults.renderer==f.jqplot.BubbleRenderer){m=true}else{if(n.series){for(var o=0;ot){y=w;w=t;t=y}if(v>s){y=v;v=s;s=y}var u=(o>=w&&o<=t&&n>=v&&n<=s);return u}function a(z,w,r,A,x){var y=x.plugins.canvasOverlay;var v=y.objects;var s=v.length;var u,o=false;var q;for(var t=0;t-1){return c/this.pt2px}else{if(b.indexOf("pt")>-1){return c}else{if(b.indexOf("em")>-1){return c*12}else{if(b.indexOf("%")>-1){return c*12/100}else{return c/this.pt2px}}}}};a.jqplot.CanvasTextRenderer.prototype.fontWeight2Float=function(b){if(Number(b)){return b/400}else{switch(b){case"normal":return 1;break;case"bold":return 1.75;break;case"bolder":return 2.25;break;case"lighter":return 0.75;break;default:return 1;break}}};a.jqplot.CanvasTextRenderer.prototype.getText=function(){return this.text};a.jqplot.CanvasTextRenderer.prototype.setText=function(c,b){this.text=c;this.setWidth(b);return this};a.jqplot.CanvasTextRenderer.prototype.getWidth=function(b){return this.width};a.jqplot.CanvasTextRenderer.prototype.setWidth=function(c,b){if(!b){this.width=this.measure(c,this.text)}else{this.width=b}return this};a.jqplot.CanvasTextRenderer.prototype.getHeight=function(b){return this.height};a.jqplot.CanvasTextRenderer.prototype.setHeight=function(b){if(!b){this.height=this.normalizedFontSize*this.pt2px}else{this.height=b}return this};a.jqplot.CanvasTextRenderer.prototype.letter=function(b){return this.letters[b]};a.jqplot.CanvasTextRenderer.prototype.ascent=function(){return this.normalizedFontSize};a.jqplot.CanvasTextRenderer.prototype.descent=function(){return 7*this.normalizedFontSize/25};a.jqplot.CanvasTextRenderer.prototype.measure=function(d,g){var f=0;var b=g.length;for(var e=0;e30)?2:2+(30-this.normalizedFontSize)/20;s.lineWidth=t*k*this.fontWeight2Float(this.fontWeight);for(var g=0;g":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};a.jqplot.CanvasFontRenderer=function(b){b=b||{};if(!b.pt2px){b.pt2px=1.5}a.jqplot.CanvasTextRenderer.call(this,b)};a.jqplot.CanvasFontRenderer.prototype=new a.jqplot.CanvasTextRenderer({});a.jqplot.CanvasFontRenderer.prototype.constructor=a.jqplot.CanvasFontRenderer;a.jqplot.CanvasFontRenderer.prototype.measure=function(c,e){var d=this.fontSize+" "+this.fontFamily;c.save();c.font=d;var b=c.measureText(e).width;c.restore();return b};a.jqplot.CanvasFontRenderer.prototype.draw=function(e,g){var c=0;var h=this.height*0.72;e.save();var d,b;if((-Math.PI/2<=this.angle&&this.angle<=0)||(Math.PI*3/2<=this.angle&&this.angle<=Math.PI*2)){d=0;b=-Math.sin(this.angle)*this.width}else{if((0b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]b.max||b.max==null){b.max=h[c][1]}}}}if(this.groupLabels.length){this.groups=this.groupLabels.length}};a.jqplot.CategoryAxisRenderer.prototype.createTicks=function(){var D=this._ticks;var z=this.ticks;var F=this.name;var C=this._dataBounds;var v,A;var q,w;var d,c;var b,x;if(z.length){if(this.groups>1&&!this._grouped){var r=z.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x1&&!this._grouped){var r=y.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x0&&o');if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var g=this._label.draw(b,j);g.appendTo(this._elem)}var f=this._ticks;for(var e=0;e');g.html(this.groupLabels[e]);this._groupLabels.push(g);g.appendTo(this._elem)}}return this._elem};a.jqplot.CategoryAxisRenderer.prototype.set=function(){var e=0;var m;var k=0;var f=0;var d=(this._label==null)?false:this._label.show;if(this.show){var n=this._ticks;for(var c=0;ce){e=m}}}var j=0;for(var c=0;cj){j=m}}if(d){k=this._label._elem.outerWidth(true);f=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){e+=j+f;this._elem.css({height:e+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){e+=j+f;this._elem.css({height:e+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){e+=j+k;this._elem.css({width:e+"px",left:"0px",top:"0px"});if(d&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",k+"px")}}else{e+=j+k;this._elem.css({width:e+"px",right:"0px",top:"0px"});if(d&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",k+"px")}}}}}};a.jqplot.CategoryAxisRenderer.prototype.pack=function(e,c){var C=this._ticks;var v=this.max;var s=this.min;var n=c.max;var l=c.min;var q=(this._label==null)?false:this._label.show;var x;for(var r in e){this._elem.css(r,e[r])}this._offsets=c;var g=n-l;var k=v-s;if(!this.reverse){this.u2p=function(h){return(h-s)*g/k+l};this.p2u=function(h){return(h-l)*k/g+s};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(h-s)*g/k};this.series_p2u=function(h){return h*k/g+s}}else{this.series_u2p=function(h){return(h-v)*g/k};this.series_p2u=function(h){return h*k/g+v}}}else{this.u2p=function(h){return l+(v-h)*g/k};this.p2u=function(h){return s+(h-l)*k/g};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(v-h)*g/k};this.series_p2u=function(h){return h*k/g+v}}else{this.series_u2p=function(h){return(s-h)*g/k};this.series_p2u=function(h){return h*k/g+s}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(x=0;x=this._ticks.length-1){continue}if(this._ticks[u]._elem&&this._ticks[u].label!=" "){var o=this._ticks[u]._elem;var r=o.position();B+=r.left+o.outerWidth(true)/2;f++}}B=B/f;this._groupLabels[x].css({left:(B-this._groupLabels[x].outerWidth(true)/2)});this._groupLabels[x].css(z[0],z[1])}}else{for(x=0;x0){b=-o._textRenderer.height*Math.cos(-o._textRenderer.angle)/2}else{b=-o.getHeight()+o._textRenderer.height*Math.cos(o._textRenderer.angle)/2}break;case"middle":b=-o.getHeight()/2;break;default:b=-o.getHeight()/2;break}}else{b=-o.getHeight()/2}var D=this.u2p(o.value)+b+"px";o._elem.css("top",D);o.pack()}}var z=["left",0];if(q){var y=this._label._elem.outerHeight(true);this._label._elem.css("top",n-g/2-y/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px");z=["left",this._label._elem.outerWidth(true)]}else{this._label._elem.css("right","0px");z=["right",this._label._elem.outerWidth(true)]}this._label.pack()}var d=parseInt(this._ticks.length/this.groups,10)+1;for(x=0;x=this._ticks.length-1){continue}if(this._ticks[u]._elem&&this._ticks[u].label!=" "){var o=this._ticks[u]._elem;var r=o.position();B+=r.top+o.outerHeight()/2;f++}}B=B/f;this._groupLabels[x].css({top:B-this._groupLabels[x].outerHeight()/2});this._groupLabels[x].css(z[0],z[1])}}}}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.ciParser.min.js b/docs/js/jqplot/plugins/jqplot.ciParser.min.js deleted file mode 100644 index e17e792..0000000 --- a/docs/js/jqplot/plugins/jqplot.ciParser.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(a){a.jqplot.ciParser=function(g,l){var m=[],o,n,h,f,e,c;if(typeof(g)=="string"){g=a.jqplot.JSON.parse(g,d)}else{if(typeof(g)=="object"){for(e in g){for(h=0;h=0){i=/^\/Date\((-?[0-9]+)\)\/$/.exec(k);if(i){return parseInt(i[1],10)}}return k}}for(var b in g){o=[];n=g[b];switch(b){case"PriceTicks":for(h=0;h6&&Math.abs(G.y-I._zoom.start[1])>6)||(I.constrainZoomTo=="x"&&Math.abs(G.x-I._zoom.start[0])>6)||(I.constrainZoomTo=="y"&&Math.abs(G.y-I._zoom.start[1])>6)){if(!C.plugins.cursor.zoomProxy){for(var y in t){if(I._zoom.axes[y]==undefined){I._zoom.axes[y]={};I._zoom.axes[y].numberTicks=F[y].numberTicks;I._zoom.axes[y].tickInterval=F[y].tickInterval;I._zoom.axes[y].daTickInterval=F[y].daTickInterval;I._zoom.axes[y].min=F[y].min;I._zoom.axes[y].max=F[y].max;I._zoom.axes[y].tickFormatString=(F[y].tickOptions!=null)?F[y].tickOptions.formatString:""}if((I.constrainZoomTo=="none")||(I.constrainZoomTo=="x"&&y.charAt(0)=="x")||(I.constrainZoomTo=="y"&&y.charAt(0)=="y")){z=t[y];if(z!=null){if(z>w[y]){v=w[y];x=z}else{D=w[y]-z;v=z;x=w[y]}q=F[y];H=null;if(q.alignTicks){if(q.name==="x2axis"&&C.axes.xaxis.show){H=C.axes.xaxis.numberTicks}else{if(q.name.charAt(0)==="y"&&q.name!=="yaxis"&&q.name!=="yMidAxis"&&C.axes.yaxis.show){H=C.axes.yaxis.numberTicks}}}if(this.looseZoom&&(F[y].renderer.constructor===j.jqplot.LinearAxisRenderer||F[y].renderer.constructor===j.jqplot.LogAxisRenderer)){J=j.jqplot.LinearTickGenerator(v,x,q._scalefact,H);if(F[y].tickInset&&J[0]F[y].max-F[y].tickInset*F[y].tickInterval){J[1]-=J[4];J[2]-=1}if(F[y].renderer.constructor===j.jqplot.LogAxisRenderer&&J[0]"}if(J.useAxesFormatters){for(var D=0;D"}w+=j.jqplot.sprintf(J.tooltipFormatString,t,z,x);N=true}}}}J._tooltipElem.html(w)}function g(C,A){var E=A.plugins.cursor;var z=E.cursorCanvas._ctx;z.clearRect(0,0,z.canvas.width,z.canvas.height);if(E.showVerticalLine){E.shapeRenderer.draw(z,[[C.x,0],[C.x,z.canvas.height]])}if(E.showHorizontalLine){E.shapeRenderer.draw(z,[[0,C.y],[z.canvas.width,C.y]])}var G=d(A,C.x,C.y);if(E.showCursorLegend){var r=j(A.targetId+" td.jqplot-cursor-legend-label");for(var B=0;B0;r--){s=v[r-1];if(q[s].show){u[s]=q[s].series_p2u(w[s.charAt(0)])}}return{offsets:t,gridPos:w,dataPos:u}}function h(z){var x=z.data.plot;var y=x.plugins.cursor;if(y.show&&y.zoom&&y._zoom.started&&!y.zoomTarget){z.preventDefault();var B=y.zoomCanvas._ctx;var v=o(z);var w=v.gridPos;var t=v.dataPos;y._zoom.gridpos=w;y._zoom.datapos=t;y._zoom.zooming=true;var u=w.x;var s=w.y;var A=B.canvas.height;var q=B.canvas.width;if(y.showTooltip&&!y.onGrid&&y.showTooltipOutsideZoom){e(w,t,x);if(y.followMouse){n(w,x)}}if(y.constrainZoomTo=="x"){y._zoom.end=[u,A]}else{if(y.constrainZoomTo=="y"){y._zoom.end=[q,s]}else{y._zoom.end=[u,s]}}var r=window.getSelection;if(document.selection&&document.selection.empty){document.selection.empty()}else{if(r&&!r().isCollapsed){r().collapse()}}l.call(y);B=null}}function a(w,s,r,x,t){var v=t.plugins.cursor;if(t.plugins.mobile){j(document).one("vmouseup.jqplot_cursor",{plot:t},p)}else{j(document).one("mouseup.jqplot_cursor",{plot:t},p)}var u=t.axes;if(document.onselectstart!=undefined){v._oldHandlers.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!=undefined){v._oldHandlers.ondrag=document.ondrag;document.ondrag=function(){return false}}if(document.onmousedown!=undefined){v._oldHandlers.onmousedown=document.onmousedown;document.onmousedown=function(){return false}}if(v.zoom){if(!v.zoomProxy){var y=v.zoomCanvas._ctx;y.clearRect(0,0,y.canvas.width,y.canvas.height);y=null}if(v.constrainZoomTo=="x"){v._zoom.start=[s.x,0]}else{if(v.constrainZoomTo=="y"){v._zoom.start=[0,s.y]}else{v._zoom.start=[s.x,s.y]}}v._zoom.started=true;for(var q in r){v._zoom.axes.start[q]=r[q]}if(t.plugins.mobile){j(document).bind("vmousemove.jqplotCursor",{plot:t},h)}else{j(document).bind("mousemove.jqplotCursor",{plot:t},h)}}}function p(y){var v=y.data.plot;var x=v.plugins.cursor;if(x.zoom&&x._zoom.zooming&&!x.zoomTarget){var u=x._zoom.gridpos.x;var r=x._zoom.gridpos.y;var t=x._zoom.datapos;var z=x.zoomCanvas._ctx.canvas.height;var q=x.zoomCanvas._ctx.canvas.width;var w=v.axes;if(x.constrainOutsideZoom&&!x.onGrid){if(u<0){u=0}else{if(u>q){u=q}}if(r<0){r=0}else{if(r>z){r=z}}for(var s in t){if(t[s]){if(s.charAt(0)=="x"){t[s]=w[s].series_p2u(u)}else{t[s]=w[s].series_p2u(r)}}}}if(x.constrainZoomTo=="x"){r=z}else{if(x.constrainZoomTo=="y"){u=q}}x._zoom.end=[u,r];x._zoom.gridpos={x:u,y:r};x.doZoom(x._zoom.gridpos,t,v,x)}x._zoom.started=false;x._zoom.zooming=false;j(document).unbind("mousemove.jqplotCursor",h);if(document.onselectstart!=undefined&&x._oldHandlers.onselectstart!=null){document.onselectstart=x._oldHandlers.onselectstart;x._oldHandlers.onselectstart=null}if(document.ondrag!=undefined&&x._oldHandlers.ondrag!=null){document.ondrag=x._oldHandlers.ondrag;x._oldHandlers.ondrag=null}if(document.onmousedown!=undefined&&x._oldHandlers.onmousedown!=null){document.onmousedown=x._oldHandlers.onmousedown;x._oldHandlers.onmousedown=null}}function l(){var y=this._zoom.start;var u=this._zoom.end;var s=this.zoomCanvas._ctx;var r,v,x,q;if(u[0]>y[0]){r=y[0];q=u[0]-y[0]}else{r=u[0];q=y[0]-u[0]}if(u[1]>y[1]){v=y[1];x=u[1]-y[1]}else{v=u[1];x=y[1]-u[1]}s.fillStyle="rgba(0,0,0,0.2)";s.strokeStyle="#999999";s.lineWidth=1;s.clearRect(0,0,s.canvas.width,s.canvas.height);s.fillRect(0,0,s.canvas.width,s.canvas.height);s.clearRect(r,v,q,x);s.strokeRect(r,v,q,x);s=null}j.jqplot.CursorLegendRenderer=function(q){j.jqplot.TableLegendRenderer.call(this,q);this.formatString="%s"};j.jqplot.CursorLegendRenderer.prototype=new j.jqplot.TableLegendRenderer();j.jqplot.CursorLegendRenderer.prototype.constructor=j.jqplot.CursorLegendRenderer;j.jqplot.CursorLegendRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}if(this.show){var w=this._series,A;var r=document.createElement("table");this._elem=j(r);r=null;this._elem.addClass("jqplot-legend jqplot-cursor-legend");this._elem.css("position","absolute");var q=false;for(var x=0;x').appendTo(this._elem);E.data("seriesIndex",s);j('
').appendTo(E);var G=j('');G.appendTo(E);G.data("seriesIndex",s);if(this.escapeHtml){G.text(D)}else{G.html(D)}E=null;G=null}return this._elem}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.dateAxisRenderer.min.js b/docs/js/jqplot/plugins/jqplot.dateAxisRenderer.min.js deleted file mode 100644 index a295489..0000000 --- a/docs/js/jqplot/plugins/jqplot.dateAxisRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(h){h.jqplot.DateAxisRenderer=function(){h.jqplot.LinearAxisRenderer.call(this);this.date=new h.jsDate()};var c=1000;var e=60*c;var f=60*e;var l=24*f;var b=7*l;var j=30.4368499*l;var k=365.242199*l;var g=[31,28,31,30,31,30,31,30,31,30,31,30];var i=["%M:%S.%#N","%M:%S.%#N","%M:%S.%#N","%M:%S","%M:%S","%M:%S","%M:%S","%H:%M:%S","%H:%M:%S","%H:%M","%H:%M","%H:%M","%H:%M","%H:%M","%H:%M","%a %H:%M","%a %H:%M","%b %e %H:%M","%b %e %H:%M","%b %e %H:%M","%b %e %H:%M","%v","%v","%v","%v","%v","%v","%v"];var m=[0.1*c,0.2*c,0.5*c,c,2*c,5*c,10*c,15*c,30*c,e,2*e,5*e,10*e,15*e,30*e,f,2*f,4*f,6*f,8*f,12*f,l,2*l,3*l,4*l,5*l,b,2*b];var d=[];function a(p,s,t){var o=Number.MAX_VALUE;var u,r,v;for(var q=0,n=m.length;qC.max)||C.max==null){C.max=y[r][0]}if(r>0){o=Math.abs(y[r][0]-y[r-1][0]);u.intervals.push(o);if(u.frequencies.hasOwnProperty(o)){u.frequencies[o]+=1}else{u.frequencies[o]=1}}x+=o}else{y[r][1]=new h.jsDate(y[r][1]).getTime();A[r][1]=new h.jsDate(y[r][1]).getTime();z[r][1]=new h.jsDate(y[r][1]).getTime();if((y[r][1]!=null&&y[r][1]C.max)||C.max==null){C.max=y[r][1]}if(r>0){o=Math.abs(y[r][1]-y[r-1][1]);u.intervals.push(o);if(u.frequencies.hasOwnProperty(o)){u.frequencies[o]+=1}else{u.frequencies[o]=1}}}x+=o}if(D.renderer.bands){if(D.renderer.bands.hiData.length){var w=D.renderer.bands.hiData;for(var r=0,q=w.length;rC.max)||C.max==null){C.max=w[r][0]}}else{w[r][1]=new h.jsDate(w[r][1]).getTime();if((w[r][1]!=null&&w[r][1]>C.max)||C.max==null){C.max=w[r][1]}}}}if(D.renderer.bands.lowData.length){var w=D.renderer.bands.lowData;for(var r=0,q=w.length;r6){D=6}}var V=new h.jsDate(ae).setDate(1).setHours(0,0,0,0);var q=new h.jsDate(J);var z=new h.jsDate(J).setDate(1).setHours(0,0,0,0);if(q.getTime()!==z.getTime()){z=z.add(1,"month")}var S=z.diff(V,"month");ab=Math.ceil(S/D)+1;this.min=V.getTime();this.max=V.clone().add((ab-1)*D,"month").getTime();this.numberTicks=ab;for(var aa=0;aa200){this.numberTicks=parseInt(3+(n-200)/100,10)}else{this.numberTicks=2}}}O=B/(this.numberTicks-1)/1000;if(this.daTickInterval==null){this.daTickInterval=[O,"seconds"]}for(var aa=0;aa570)?n[o]*0.8:n[o]+0.3*(255-n[o]);n[o]=parseInt(n[o],10)}this.highlightColors.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}}t.postParseOptionsHooks.addOnce(l);t.postInitHooks.addOnce(g);t.eventListenerHooks.addOnce("jqplotMouseMove",b);t.eventListenerHooks.addOnce("jqplotMouseDown",a);t.eventListenerHooks.addOnce("jqplotMouseUp",j);t.eventListenerHooks.addOnce("jqplotClick",f);t.eventListenerHooks.addOnce("jqplotRightClick",m);t.postDrawHooks.addOnce(h)};e.jqplot.DonutRenderer.prototype.setGridData=function(s){var o=[];var t=[];var n=this.startAngle/180*Math.PI;var r=0;this._drawData=false;for(var q=0;q0){o[q]+=o[q-1]}r+=this.data[q][1]}var p=Math.PI*2/o[o.length-1];for(var q=0;q0){o[q]+=o[q-1]}r+=s[q][1]}var p=Math.PI*2/o[o.length-1];for(var q=0;q6.282+this.startAngle){t=6.282+this.startAngle;if(u>t){u=6.281+this.startAngle}}if(u>=t){return}x.beginPath();x.fillStyle=p;x.strokeStyle=p;x.arc(0,0,n,u,t,false);x.lineTo(v*Math.cos(t),v*Math.sin(t));x.arc(0,0,v,t,u,true);x.closePath();if(w){x.fill()}else{x.stroke()}}if(s){for(var q=0;q1&&this.index>0)?this._previousSeries[0]._diameter:this._diameter;this._thickness=this.thickness||(M-this.innerDiameter-2*X*this._numberSeries)/this._numberSeries/2}else{this._thickness=this.thickness||v/2/(this._numberSeries+1)*0.85}var K=this._radius=this._diameter/2;this._innerRadius=this._radius-this._thickness;var o=this.startAngle/180*Math.PI;this._center=[(s-u*q)/2+u*q,(H-u*p)/2+u*p];if(this.shadow){var L="rgba(0,0,0,"+this.shadowAlpha+")";for(var Q=0;Q=this.dataLabelThreshold){var S,U=(A+z)/2,C;if(this.dataLabels=="label"){S=this.dataLabelFormatString||"%s";C=e.jqplot.sprintf(S,V[Q][0])}else{if(this.dataLabels=="value"){S=this.dataLabelFormatString||"%d";C=e.jqplot.sprintf(S,this.data[Q][1])}else{if(this.dataLabels=="percent"){S=this.dataLabelFormatString||"%d%%";C=e.jqplot.sprintf(S,V[Q][2]*100)}else{if(this.dataLabels.constructor==Array){S=this.dataLabelFormatString||"%s";C=e.jqplot.sprintf(S,this.dataLabels[Q])}}}}var n=this._innerRadius+this._thickness*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var F=this._center[0]+Math.cos(U)*n+this.canvas._offsets.left;var E=this._center[1]+Math.sin(U)*n+this.canvas._offsets.top;var D=e(''+C+"").insertBefore(P.eventCanvas._elem);F-=D.width()/2;E-=D.height()/2;F=Math.round(F);E=Math.round(E);D.css({left:F,top:E})}}};e.jqplot.DonutAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.DonutAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.DonutAxisRenderer.prototype.constructor=e.jqplot.DonutAxisRenderer;e.jqplot.DonutAxisRenderer.prototype.init=function(n){this.tickRenderer=e.jqplot.DonutTickRenderer;e.extend(true,this,n);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.DonutLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.DonutLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.DonutLegendRenderer.prototype.constructor=e.jqplot.DonutLegendRenderer;e.jqplot.DonutLegendRenderer.prototype.init=function(n){this.numberRows=null;this.numberColumns=null;e.extend(true,this,n)};e.jqplot.DonutLegendRenderer.prototype.draw=function(){var q=this;if(this.show){var y=this._series;var B="position:absolute;";B+=(this.background)?"background:"+this.background+";":"";B+=(this.border)?"border:"+this.border+";":"";B+=(this.fontSize)?"font-size:"+this.fontSize+";":"";B+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";B+=(this.textColor)?"color:"+this.textColor+";":"";B+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";B+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";B+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";B+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=e('
');var F=false,x=false,n,v;var z=y[0];var o=new e.jqplot.ColorGenerator(z.seriesColors);if(z.show){var G=z.data;if(this.numberRows){n=this.numberRows;if(!this.numberColumns){v=Math.ceil(G.length/n)}else{v=this.numberColumns}}else{if(this.numberColumns){v=this.numberColumns;n=Math.ceil(G.length/this.numberColumns)}else{n=G.length;v=1}}var E,D,p,t,r,u,w,C;var A=0;for(E=0;E').prependTo(this._elem)}else{p=e('').appendTo(this._elem)}for(D=0;D0){F=true}else{F=false}}else{if(E==n-1){F=false}else{F=true}}w=(F)?this.rowSpacing:"0";t=e('
');r=e('');if(this.escapeHtml){r.text(u)}else{r.html(u)}if(x){r.prependTo(p);t.prependTo(p)}else{t.appendTo(p);r.appendTo(p)}F=true}A++}}}}return this._elem};function c(r,q,o){o=o||{};o.axesDefaults=o.axesDefaults||{};o.legend=o.legend||{};o.seriesDefaults=o.seriesDefaults||{};var n=false;if(o.seriesDefaults.renderer==e.jqplot.DonutRenderer){n=true}else{if(o.series){for(var p=0;p=0.6)?l[3]*0.6:l[3]*(2-l[3]);m.color="rgba("+o[0]+","+o[1]+","+o[2]+","+k+")"}i.color=m.color;i.init();var g=(p.pointIndex>0)?p.pointIndex-1:0;var j=p.pointIndex+2;m._gridData=q.gridData.slice(g,j)}function e(o,l,h,t,m){if(m.plugins.dragable.dragCanvas.isDragging){var u=m.plugins.dragable.dragCanvas;var i=u._neighbor;var w=m.series[i.seriesIndex];var k=w.plugins.dragable;var r=w.gridData;var p=(k.constrainTo=="y")?i.gridData[0]:l.x;var n=(k.constrainTo=="x")?i.gridData[1]:l.y;var g=w._xaxis.series_p2u(p);var q=w._yaxis.series_p2u(n);var v=u._ctx;v.clearRect(0,0,v.canvas.width,v.canvas.height);if(i.pointIndex>0){k._gridData[1]=[p,n]}else{k._gridData[0]=[p,n]}m.series[i.seriesIndex].draw(u._ctx,{gridData:k._gridData,shadow:false,preventJqPlotSeriesDrawTrigger:true,color:k.color,markerOptions:{color:k.color,shadow:false},trendline:{show:false}});m.target.trigger("jqplotSeriesPointChange",[i.seriesIndex,i.pointIndex,[g,q],[p,n]])}else{if(t!=null){var j=m.series[t.seriesIndex];if(j.isDragable){var u=m.plugins.dragable.dragCanvas;if(!u.isOver){u._cursors.push(o.target.style.cursor);o.target.style.cursor="pointer"}u.isOver=true}}else{if(t==null){var u=m.plugins.dragable.dragCanvas;if(u.isOver){o.target.style.cursor=u._cursors.pop();u.isOver=false}}}}}function c(k,i,g,l,j){var m=j.plugins.dragable.dragCanvas;m._cursors.push(k.target.style.cursor);if(l!=null){var o=j.series[l.seriesIndex];var h=o.plugins.dragable;if(o.isDragable&&!m.isDragging){m._neighbor=l;m.isDragging=true;f(j,l);h.markerRenderer.draw(o.gridData[l.pointIndex][0],o.gridData[l.pointIndex][1],m._ctx);k.target.style.cursor="move";j.target.trigger("jqplotDragStart",[l.seriesIndex,l.pointIndex,i,g])}}else{var n=m._ctx;n.clearRect(0,0,n.canvas.width,n.canvas.height);m.isDragging=false}}function a(m,j,g,o,k){if(k.plugins.dragable.dragCanvas.isDragging){var p=k.plugins.dragable.dragCanvas;var q=p._ctx;q.clearRect(0,0,q.canvas.width,q.canvas.height);p.isDragging=false;var h=p._neighbor;var r=k.series[h.seriesIndex];var i=r.plugins.dragable;var n=(i.constrainTo=="y")?h.data[0]:g[r.xaxis];var l=(i.constrainTo=="x")?h.data[1]:g[r.yaxis];r.data[h.pointIndex][0]=n;r.data[h.pointIndex][1]=l;k.drawSeries({preventJqPlotSeriesDrawTrigger:true},h.seriesIndex);p._neighbor=null;m.target.style.cursor=p._cursors.pop();k.target.trigger("jqplotDragStop",[j,g])}}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js b/docs/js/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js deleted file mode 100644 index dc40b3c..0000000 --- a/docs/js/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(c){c.jqplot.EnhancedLegendRenderer=function(){c.jqplot.TableLegendRenderer.call(this)};c.jqplot.EnhancedLegendRenderer.prototype=new c.jqplot.TableLegendRenderer();c.jqplot.EnhancedLegendRenderer.prototype.constructor=c.jqplot.EnhancedLegendRenderer;c.jqplot.EnhancedLegendRenderer.prototype.init=function(d){this.numberRows=null;this.numberColumns=null;this.seriesToggle="normal";this.seriesToggleReplot=false;this.disableIEFading=true;c.extend(true,this,d);if(this.seriesToggle){c.jqplot.postDrawHooks.push(b)}};c.jqplot.EnhancedLegendRenderer.prototype.draw=function(m,y){var f=this;if(this.show){var r=this._series;var u;var w="position:absolute;";w+=(this.background)?"background:"+this.background+";":"";w+=(this.border)?"border:"+this.border+";":"";w+=(this.fontSize)?"font-size:"+this.fontSize+";":"";w+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";w+=(this.textColor)?"color:"+this.textColor+";":"";w+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";w+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";w+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";w+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=c('
');if(this.seriesToggle){this._elem.css("z-index","3")}var C=false,q=false,d,o;if(this.numberRows){d=this.numberRows;if(!this.numberColumns){o=Math.ceil(r.length/d)}else{o=this.numberColumns}}else{if(this.numberColumns){o=this.numberColumns;d=Math.ceil(r.length/this.numberColumns)}else{d=r.length;o=1}}var B,z,e,l,k,n,p,t,h,g;var v=0;for(B=r.length-1;B>=0;B--){if(o==1&&r[B]._stack||r[B].renderer.constructor==c.jqplot.BezierCurveRenderer){q=true}}for(B=0;B0){C=true}else{C=false}}else{if(B==d-1){C=false}else{C=true}}p=(C)?this.rowSpacing:"0";l=c(document.createElement("td"));l.addClass("jqplot-table-legend jqplot-table-legend-swatch");l.css({textAlign:"center",paddingTop:p});h=c(document.createElement("div"));h.addClass("jqplot-table-legend-swatch-outline");g=c(document.createElement("div"));g.addClass("jqplot-table-legend-swatch");g.css({backgroundColor:x,borderColor:x});l.append(h.append(g));k=c(document.createElement("td"));k.addClass("jqplot-table-legend jqplot-table-legend-label");k.css("paddingTop",p);if(this.escapeHtml){k.text(n)}else{k.html(n)}if(q){if(this.showLabels){k.prependTo(e)}if(this.showSwatches){l.prependTo(e)}}else{if(this.showSwatches){l.appendTo(e)}if(this.showLabels){k.appendTo(e)}}if(this.seriesToggle){var A;if(typeof(this.seriesToggle)==="string"||typeof(this.seriesToggle)==="number"){if(!c.jqplot.use_excanvas||!this.disableIEFading){A=this.seriesToggle}}if(this.showSwatches){l.bind("click",{series:u,speed:A,plot:y,replot:this.seriesToggleReplot},a);l.addClass("jqplot-seriesToggle")}if(this.showLabels){k.bind("click",{series:u,speed:A,plot:y,replot:this.seriesToggleReplot},a);k.addClass("jqplot-seriesToggle")}if(!u.show&&u.showLabel){l.addClass("jqplot-series-hidden");k.addClass("jqplot-series-hidden")}}C=true}}v++}l=k=h=g=null}}return this._elem};var a=function(j){var i=j.data,m=i.series,k=i.replot,h=i.plot,f=i.speed,l=m.index,g=false;if(m.canvas._elem.is(":hidden")||!m.show){g=true}var e=function(){if(k){var n={};if(c.isPlainObject(k)){c.extend(true,n,k)}h.replot(n);if(g&&f){var d=h.series[l];if(d.shadowCanvas._elem){d.shadowCanvas._elem.hide().fadeIn(f)}d.canvas._elem.hide().fadeIn(f);d.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+d.index).hide().fadeIn(f)}}else{var d=h.series[l];if(d.canvas._elem.is(":hidden")||!d.show){if(typeof h.options.legend.showSwatches==="undefined"||h.options.legend.showSwatches===true){h.legend._elem.find("td").eq(l*2).addClass("jqplot-series-hidden")}if(typeof h.options.legend.showLabels==="undefined"||h.options.legend.showLabels===true){h.legend._elem.find("td").eq((l*2)+1).addClass("jqplot-series-hidden")}}else{if(typeof h.options.legend.showSwatches==="undefined"||h.options.legend.showSwatches===true){h.legend._elem.find("td").eq(l*2).removeClass("jqplot-series-hidden")}if(typeof h.options.legend.showLabels==="undefined"||h.options.legend.showLabels===true){h.legend._elem.find("td").eq((l*2)+1).removeClass("jqplot-series-hidden")}}}};m.toggleDisplay(j,e)};var b=function(){if(this.legend.renderer.constructor==c.jqplot.EnhancedLegendRenderer&&this.legend.seriesToggle){var d=this.legend._elem.detach();this.eventCanvas._elem.after(d)}}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.funnelRenderer.min.js b/docs/js/jqplot/plugins/jqplot.funnelRenderer.min.js deleted file mode 100644 index 8a705de..0000000 --- a/docs/js/jqplot/plugins/jqplot.funnelRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(e){e.jqplot.FunnelRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.FunnelRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.FunnelRenderer.prototype.constructor=e.jqplot.FunnelRenderer;e.jqplot.FunnelRenderer.prototype.init=function(p,t){this.padding={top:20,right:20,bottom:20,left:20};this.sectionMargin=6;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.widthRatio=0.2;this.lineWidth=2;this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this._type="funnel";this.tickRenderer=e.jqplot.FunnelTickRenderer;if(p.highlightMouseDown&&p.highlightMouseOver==null){p.highlightMouseOver=false}e.extend(true,this,p);this._highlightedPoint=null;this._bases=[];this._atot;this._areas=[];this._lengths=[];this._angle;this._dataIndices=[];this._unorderedData=e.extend(true,[],this.data);var o=e.extend(true,[],this.data);for(var r=0;r570)?m[n]*0.8:m[n]+0.4*(255-m[n]);m[n]=parseInt(m[n],10)}this.highlightColors.push("rgb("+m[0]+","+m[1]+","+m[2]+")")}}t.postParseOptionsHooks.addOnce(k);t.postInitHooks.addOnce(g);t.eventListenerHooks.addOnce("jqplotMouseMove",a);t.eventListenerHooks.addOnce("jqplotMouseDown",b);t.eventListenerHooks.addOnce("jqplotMouseUp",j);t.eventListenerHooks.addOnce("jqplotClick",f);t.eventListenerHooks.addOnce("jqplotRightClick",l);t.postDrawHooks.addOnce(h)};e.jqplot.FunnelRenderer.prototype.setGridData=function(o){var n=0;var p=[];for(var m=0;mthis._lengths[Y]*n&&W<100){this._lengths[Y]=this._areas[Y]/(this._bases[Y]-this._lengths[Y]*Math.tan(this._angle));aa=Math.abs(this._lengths[Y]-E);this._bases[Y+1]=this._bases[Y]-(2*this._lengths[Y]*Math.tan(this._angle));E=this._lengths[Y];W++}Q+=this._lengths[Y]}this._vertices=new Array(B.length);var ae=[t,F],ad=[t+this._bases[0],F],ac=[t+(this._bases[0]-this._bases[this._bases.length-1])/2,F+this._length],ab=[ac[0]+this._bases[this._bases.length-1],ac[1]];function V(ag){var x=(ae[1]-ac[1])/(ae[0]-ac[0]);var v=ae[1]-x*ae[0];var ah=ag+ae[1];return[(ah-v)/x,ah]}function D(ag){var x=(ad[1]-ab[1])/(ad[0]-ab[0]);var v=ad[1]-x*ad[0];var ah=ag+ad[1];return[(ah-v)/x,ah]}var T=w,S=u;var Z=0,m=0;for(Y=0;Y0&&Y0&&Y=this.dataLabelThreshold){var K,X;if(this.dataLabels=="label"){K=this.dataLabelFormatString||"%s";X=e.jqplot.sprintf(K,B[Y][0])}else{if(this.dataLabels=="value"){K=this.dataLabelFormatString||"%d";X=e.jqplot.sprintf(K,this.data[Y][1])}else{if(this.dataLabels=="percent"){K=this.dataLabelFormatString||"%d%%";X=e.jqplot.sprintf(K,B[Y][1]*100)}else{if(this.dataLabels.constructor==Array){K=this.dataLabelFormatString||"%s";X=e.jqplot.sprintf(K,this.dataLabels[this._dataIndices[Y]])}}}}var s=(this._radius)*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var T=(U[0][0]+U[1][0])/2+this.canvas._offsets.left;var S=(U[1][1]+U[2][1])/2+this.canvas._offsets.top;var z=e(''+X+"").insertBefore(p.eventCanvas._elem);T-=z.width()/2;S-=z.height()/2;T=Math.round(T);S=Math.round(S);z.css({left:T,top:S})}}};e.jqplot.FunnelAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.FunnelAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.FunnelAxisRenderer.prototype.constructor=e.jqplot.FunnelAxisRenderer;e.jqplot.FunnelAxisRenderer.prototype.init=function(m){this.tickRenderer=e.jqplot.FunnelTickRenderer;e.extend(true,this,m);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.FunnelLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.FunnelLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.FunnelLegendRenderer.prototype.constructor=e.jqplot.FunnelLegendRenderer;e.jqplot.FunnelLegendRenderer.prototype.init=function(m){this.numberRows=null;this.numberColumns=null;e.extend(true,this,m)};e.jqplot.FunnelLegendRenderer.prototype.draw=function(){var p=this;if(this.show){var x=this._series;var A="position:absolute;";A+=(this.background)?"background:"+this.background+";":"";A+=(this.border)?"border:"+this.border+";":"";A+=(this.fontSize)?"font-size:"+this.fontSize+";":"";A+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";A+=(this.textColor)?"color:"+this.textColor+";":"";A+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";A+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";A+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";A+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=e('
');var E=false,w=false,m,u;var y=x[0];var n=new e.jqplot.ColorGenerator(y.seriesColors);if(y.show){var F=y.data;if(this.numberRows){m=this.numberRows;if(!this.numberColumns){u=Math.ceil(F.length/m)}else{u=this.numberColumns}}else{if(this.numberColumns){u=this.numberColumns;m=Math.ceil(F.length/this.numberColumns)}else{m=F.length;u=1}}var D,C,o,r,q,t,v,B;var z=0;for(D=0;D').prependTo(this._elem)}else{o=e('').appendTo(this._elem)}for(C=0;C0){E=true}else{E=false}}else{if(D==m-1){E=false}else{E=true}}v=(E)?this.rowSpacing:"0";r=e('
');q=e('');if(this.escapeHtml){q.text(t)}else{q.html(t)}if(w){q.prependTo(o);r.prependTo(o)}else{r.appendTo(o);q.appendTo(o)}E=true}z++}}}}return this._elem};function c(q,p,n){n=n||{};n.axesDefaults=n.axesDefaults||{};n.legend=n.legend||{};n.seriesDefaults=n.seriesDefaults||{};var m=false;if(n.seriesDefaults.renderer==e.jqplot.FunnelRenderer){m=true}else{if(n.series){for(var o=0;o=0.6)?l[3]*0.6:l[3]*(2-l[3]);i.color="rgba("+n[0]+","+n[1]+","+n[2]+","+k+")";i.init();i.draw(p.gridData[o.pointIndex][0],p.gridData[o.pointIndex][1],j.highlightCanvas._ctx)}function g(A,q,m){var k=A.plugins.highlighter;var D=k._tooltipElem;var r=q.highlighter||{};var t=d.extend(true,{},k,r);if(t.useAxesFormatters){var w=q._xaxis._ticks[0].formatter;var h=q._yaxis._ticks[0].formatter;var E=q._xaxis._ticks[0].formatString;var s=q._yaxis._ticks[0].formatString;var z;var u=w(E,m.data[0]);var l=[];for(var B=1;B140){h=Math.round(Math.log(this.max/this.min)/Math.log(this.base)+1);if(h<2){h=2}if(C===0){var o=b/(h-1);if(o<100){C=0}else{if(o<190){C=1}else{if(o<250){C=3}else{if(o<600){C=4}else{C=9}}}}}}else{h=2;if(C===0){C=1}C=0}}else{h=this.numberTicks}if(E>=0&&C!==3){this._autoFormatString="%d"}else{if(E<=0&&C===3){var o=-(E-1);this._autoFormatString="%."+Math.abs(E-1)+"f"}else{if(E<0){var o=-E;this._autoFormatString="%."+Math.abs(E)+"f"}else{this._autoFormatString="%d"}}}var O,H,z,p,n,k;for(var K=0;K=0;J--){z=p-k*(J+1);H=new this.tickRenderer(this.tickOptions);if(this._overrideFormatString&&this._autoFormatString!=""){H.formatString=this._autoFormatString}if(!this.showTicks){H.showLabel=false;H.showMark=false}else{if(!this.showTickMarks){H.showMark=false}}H.setTick(z,this.name);this._ticks.push(H)}}}}else{if(this.min!=null&&this.max!=null){var y=a.extend(true,{},this.tickOptions,{name:this.name,value:null});var I,e;if(this.numberTicks==null&&this.tickInterval==null){var D=Math.max(b,g+1);var L=Math.ceil((D-g)/35+1);var B=a.jqplot.LinearTickGenerator.bestConstrainedInterval(this.min,this.max,L);this._autoFormatString=B[3];I=B[2];e=B[4];for(var K=0;K0){c=-n._textRenderer.height*Math.cos(-n._textRenderer.angle)/2}else{c=-n.getHeight()+n._textRenderer.height*Math.cos(n._textRenderer.angle)/2}break;case"middle":c=-n.getHeight()/2;break;default:c=-n.getHeight()/2;break}}else{c=-n.getHeight()/2}var z=this.u2p(n.value)+c+"px";n._elem.css("top",z);n.pack()}}if(o){var x=this._label._elem.outerHeight(true);this._label._elem.css("top",m-g/2-x/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js b/docs/js/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js deleted file mode 100644 index 420dd13..0000000 --- a/docs/js/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(a){a.jqplot.MekkoAxisRenderer=function(){};a.jqplot.MekkoAxisRenderer.prototype.init=function(c){this.tickMode;this.barLabelRenderer=a.jqplot.AxisLabelRenderer;this.barLabels=this.barLabels||[];this.barLabelOptions={};this.tickOptions=a.extend(true,{showGridline:false},this.tickOptions);this._barLabels=[];a.extend(true,this,c);if(this.name=="yaxis"){this.tickOptions.formatString=this.tickOptions.formatString||"%d%"}var b=this._dataBounds;b.min=0;if(this.name=="yaxis"||this.name=="y2axis"){b.max=100;this.tickMode="even"}else{if(this.name=="xaxis"){this.tickMode=(this.tickMode==null)?"bar":this.tickMode;for(var d=0;dk){k=d}}}if(b){c=this._label._elem.outerWidth(true);j=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){k=k+j;this._elem.css({height:k+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){k=k+j;this._elem.css({height:k+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){k=k+c;this._elem.css({width:k+"px",left:"0px",top:"0px"});if(b&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",c+"px")}}else{k=k+c;this._elem.css({width:k+"px",right:"0px",top:"0px"});if(b&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",c+"px")}}}}}};a.jqplot.MekkoAxisRenderer.prototype.createTicks=function(){var z=this._ticks;var w=this.ticks;var B=this.name;var y=this._dataBounds;var p,x;var n,r;var d,c;var h,b,s,q;if(w.length){for(s=0;s0){g=Math.max(Math.log(n)/Math.LN10,0.05)}n-=g;r+=g}var k=r-n;var m,o;var v,l,u;var f=[3,5,6,11,21];if(this.name=="yaxis"||this.name=="y2axis"){this.min=0;this.max=100;if(!this.numberTicks){if(this.tickInterval){this.numberTicks=3+Math.ceil(k/this.tickInterval)}else{v=2+Math.ceil((p-(this.tickSpacing-1))/this.tickSpacing);for(s=0;s1){l=u;continue}else{if(u<1){if(Math.abs(l-1)v){h=new this.tickRenderer(this.tickOptions);if(!this.showTicks){h.showLabel=false;h.showMark=false}else{if(!this.showTickMarks){h.showMark=false}}h.setTick(this.max,this.name);this._ticks.push(h)}}else{if(this.tickMode=="even"){this.min=0;this.max=this.max||y.max;var A=2+Math.ceil((p-(this.tickSpacing-1))/this.tickSpacing);k=this.max-this.min;this.numberTicks=A;this.tickInterval=k/(this.numberTicks-1);for(s=0;s0){c=-n._textRenderer.height*Math.cos(-n._textRenderer.angle)/2}else{c=-n.getHeight()+n._textRenderer.height*Math.cos(n._textRenderer.angle)/2}break;case"middle":c=-n.getHeight()/2;break;default:c=-n.getHeight()/2;break}}else{c=-n.getHeight()/2}var D=this.u2p(n.value)+c+"px";n._elem.css("top",D);n.pack()}}if(o){var z=this._label._elem.outerHeight(true);this._label._elem.css("top",m-f/2-z/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.mekkoRenderer.min.js b/docs/js/jqplot/plugins/jqplot.mekkoRenderer.min.js deleted file mode 100644 index cece3cd..0000000 --- a/docs/js/jqplot/plugins/jqplot.mekkoRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(b){b.jqplot.MekkoRenderer=function(){this.shapeRenderer=new b.jqplot.ShapeRenderer();this.borderColor=null;this.showBorders=true};b.jqplot.MekkoRenderer.prototype.init=function(c,e){this.fill=false;this.fillRect=true;this.strokeRect=true;this.shadow=false;this._xwidth=0;this._xstart=0;b.extend(true,this.renderer,c);var d={lineJoin:"miter",lineCap:"butt",isarc:false,fillRect:this.fillRect,strokeRect:this.strokeRect};this.renderer.shapeRenderer.init(d);e.axes.x2axis._series.push(this);this._type="mekko"};b.jqplot.MekkoRenderer.prototype.setGridData=function(h){var e=this._xaxis.series_u2p;var c=this._yaxis.series_u2p;var g=this._plotData;this.gridData=[];this._xwidth=e(this._sumy)-e(0);if(this.index>0){this._xstart=h.series[this.index-1]._xstart+h.series[this.index-1]._xwidth}var l=this.canvas.getHeight();var d=0;var k;var j;for(var f=0;f');var w=false,n=true,c,l;var p=o[0];var d=new b.jqplot.ColorGenerator(p.seriesColors);if(p.show){var x=p.data;if(this.numberRows){c=this.numberRows;if(!this.numberColumns){l=Math.ceil(x.length/c)}else{l=this.numberColumns}}else{if(this.numberColumns){l=this.numberColumns;c=Math.ceil(x.length/this.numberColumns)}else{c=x.length;l=1}}var v,u,e,h,g,k,m,t;var q=0;for(v=0;v').prependTo(this._elem)}else{e=b('').appendTo(this._elem)}for(u=0;u0){w=true}else{w=false}}else{if(v==c-1){w=false}else{w=true}}m=(w)?this.rowSpacing:"0";h=b('
');g=b('');if(this.escapeHtml){g.text(k)}else{g.html(k)}if(n){g.prependTo(e);h.prependTo(e)}else{h.appendTo(e);g.appendTo(e)}w=true}q++}}e=null;h=null;g=null}}return this._elem};b.jqplot.MekkoLegendRenderer.prototype.pack=function(f){if(this.show){var e={_top:f.top,_left:f.left,_right:f.right,_bottom:this._plotDimensions.height-f.bottom};if(this.placement=="insideGrid"){switch(this.location){case"nw":var d=e._left+this.xoffset;var c=e._top+this.yoffset;this._elem.css("left",d);this._elem.css("top",c);break;case"n":var d=(f.left+(this._plotDimensions.width-f.right))/2-this.getWidth()/2;var c=e._top+this.yoffset;this._elem.css("left",d);this._elem.css("top",c);break;case"ne":var d=f.right+this.xoffset;var c=e._top+this.yoffset;this._elem.css({right:d,top:c});break;case"e":var d=f.right+this.xoffset;var c=(f.top+(this._plotDimensions.height-f.bottom))/2-this.getHeight()/2;this._elem.css({right:d,top:c});break;case"se":var d=f.right+this.xoffset;var c=f.bottom+this.yoffset;this._elem.css({right:d,bottom:c});break;case"s":var d=(f.left+(this._plotDimensions.width-f.right))/2-this.getWidth()/2;var c=f.bottom+this.yoffset;this._elem.css({left:d,bottom:c});break;case"sw":var d=e._left+this.xoffset;var c=f.bottom+this.yoffset;this._elem.css({left:d,bottom:c});break;case"w":var d=e._left+this.xoffset;var c=(f.top+(this._plotDimensions.height-f.bottom))/2-this.getHeight()/2;this._elem.css({left:d,top:c});break;default:var d=e._right-this.xoffset;var c=e._bottom+this.yoffset;this._elem.css({right:d,bottom:c});break}}else{switch(this.location){case"nw":var d=this._plotDimensions.width-e._left+this.xoffset;var c=e._top+this.yoffset;this._elem.css("right",d);this._elem.css("top",c);break;case"n":var d=(f.left+(this._plotDimensions.width-f.right))/2-this.getWidth()/2;var c=this._plotDimensions.height-e._top+this.yoffset;this._elem.css("left",d);this._elem.css("bottom",c);break;case"ne":var d=this._plotDimensions.width-f.right+this.xoffset;var c=e._top+this.yoffset;this._elem.css({left:d,top:c});break;case"e":var d=this._plotDimensions.width-f.right+this.xoffset;var c=(f.top+(this._plotDimensions.height-f.bottom))/2-this.getHeight()/2;this._elem.css({left:d,top:c});break;case"se":var d=this._plotDimensions.width-f.right+this.xoffset;var c=f.bottom+this.yoffset;this._elem.css({left:d,bottom:c});break;case"s":var d=(f.left+(this._plotDimensions.width-f.right))/2-this.getWidth()/2;var c=this._plotDimensions.height-f.bottom+this.yoffset;this._elem.css({left:d,top:c});break;case"sw":var d=this._plotDimensions.width-e._left+this.xoffset;var c=f.bottom+this.yoffset;this._elem.css({right:d,bottom:c});break;case"w":var d=this._plotDimensions.width-e._left+this.xoffset;var c=(f.top+(this._plotDimensions.height-f.bottom))/2-this.getHeight()/2;this._elem.css({right:d,top:c});break;default:var d=e._right-this.xoffset;var c=e._bottom+this.yoffset;this._elem.css({right:d,bottom:c});break}}}};function a(g,f,d){d=d||{};d.axesDefaults=d.axesDefaults||{};d.legend=d.legend||{};d.seriesDefaults=d.seriesDefaults||{};var c=false;if(d.seriesDefaults.renderer==b.jqplot.MekkoRenderer){c=true}else{if(d.series){for(var e=0;e=this.data[0][1]){this.max=this.intervals[this.intervals.length-1][0];this.setmax=false}}else{this.setmax=false}}else{this.min=(this.min==null)?0:this.min;this.setmin=false;if(this.max==null){this.max=this.data[0][1]*1.25;this.setmax=true}else{this.setmax=false}}}};c.jqplot.MeterGaugeRenderer.prototype.setGridData=function(j){var f=[];var k=[];var e=this.startAngle;for(var h=0;h0){f[h]+=f[h-1]}}var g=Math.PI*2/f[f.length-1];for(var h=0;h0){f[h]+=f[h-1]}}var g=Math.PI*2/f[f.length-1];for(var h=0;h=0;h--){e=f/(j[h]*Math.pow(10,g));if(e==4||e==5){return e-1}}return null}c.jqplot.MeterGaugeRenderer.prototype.draw=function(X,aC,ap){var aa;var aM=(ap!=undefined)?ap:{};var ai=0;var ah=0;var at=1;if(ap.legendInfo&&ap.legendInfo.placement=="inside"){var aI=ap.legendInfo;switch(aI.location){case"nw":ai=aI.width+aI.xoffset;break;case"w":ai=aI.width+aI.xoffset;break;case"sw":ai=aI.width+aI.xoffset;break;case"ne":ai=aI.width+aI.xoffset;at=-1;break;case"e":ai=aI.width+aI.xoffset;at=-1;break;case"se":ai=aI.width+aI.xoffset;at=-1;break;case"n":ah=aI.height+aI.yoffset;break;case"s":ah=aI.height+aI.yoffset;at=-1;break;default:break}}if(this.label){this._labelElem=c('
'+this.label+"
");this.canvas._elem.after(this._labelElem)}var m=(aM.shadow!=undefined)?aM.shadow:this.shadow;var N=(aM.showLine!=undefined)?aM.showLine:this.showLine;var I=(aM.fill!=undefined)?aM.fill:this.fill;var K=X.canvas.width;var S=X.canvas.height;if(this.padding==null){this.padding=Math.round(Math.min(K,S)/30)}var Q=K-ai-2*this.padding;var ab=S-ah-2*this.padding;if(this.labelPosition=="bottom"&&this.label){ab-=this._labelElem.outerHeight(true)}var L=Math.min(Q,ab);var ad=L;if(!this.diameter){if(this.semiCircular){if(Q>=2*ab){if(!this.ringWidth){this.ringWidth=2*ab/35}this.needleThickness=this.needleThickness||2+Math.pow(this.ringWidth,0.8);this.innerPad=this.ringWidth/2+this.needleThickness/2+this.needlePad;this.diameter=2*(ab-2*this.innerPad)}else{if(!this.ringWidth){this.ringWidth=Q/35}this.needleThickness=this.needleThickness||2+Math.pow(this.ringWidth,0.8);this.innerPad=this.ringWidth/2+this.needleThickness/2+this.needlePad;this.diameter=Q-2*this.innerPad-this.ringWidth-this.padding}this._center=[(K-at*ai)/2+at*ai,(S+at*ah-this.padding-this.ringWidth-this.innerPad)]}else{if(!this.ringWidth){this.ringWidth=ad/35}this.needleThickness=this.needleThickness||2+Math.pow(this.ringWidth,0.8);this.innerPad=0;this.diameter=ad-this.ringWidth;this._center=[(K-at*ai)/2+at*ai,(S-at*ah)/2+at*ah]}if(this._labelElem&&this.labelPosition=="bottom"){this._center[1]-=this._labelElem.outerHeight(true)}}this._radius=this.diameter/2;this.tickSpacing=6000/this.diameter;if(!this.hubRadius){this.hubRadius=this.diameter/18}this.shadowOffset=0.5+this.ringWidth/9;this.shadowWidth=this.ringWidth*1;this.tickPadding=3+Math.pow(this.diameter/20,0.7);this.tickOuterRadius=this._radius-this.ringWidth/2-this.tickPadding;this.tickLength=(this.showTicks)?this._radius/13:0;if(this.ticks.length==0){var A=this.max,aL=this.min,q=this.setmax,aG=this.setmin,au=(A-aL)*this.tickSpacing/this.span;var aw=Math.floor(parseFloat((Math.log(au)/Math.log(10)).toFixed(11)));var an=(au/Math.pow(10,aw));(an>2&&an<=2.5)?an=2.5:an=Math.ceil(an);var T=this.tickPositions;var aA,ak;for(aa=0;aa0)?aL-aL%au:aL-aL%au-au;if(!this.forceZero){var D=Math.min(aL-aP,0.8*au);var o=Math.floor(D/T[aA]);if(o>1){aP=aP+T[aA]*(o-1);if(parseInt(aP,10)!=aP&&parseInt(aP-T[aA],10)==aP-T[aA]){aP=aP-T[aA]}}}if(aL==aP){aL-=au}else{if(aL-aP>0.23*au){aL=aP}else{aL=aP-au;ak+=1}}ak+=1;var E=aL+(ak-1)*au;if(A>=E){E+=au;ak+=1}if(E-A<0.23*au){E+=au;ak+=1}this.max=A=E;this.min=aL;this.tickInterval=au;this.numberTicks=ak;var O;for(aa=0;aa=E){A=E+au;ak+=1}else{A=E}this.tickInterval=this.tickInterval||au;this.numberTicks=this.numberTicks||ak;var O;for(aa=0;aa1){var aJ=String(P);if(aJ.search(/\./)==-1){var aF=aJ.search(/0+$/);av=(aF>0)?aJ.length-aF-1:0}}M=P/Math.pow(10,av);for(aa=0;aa'+this.ticks[aa][1]+"");this.canvas._elem.after(J);aO=J.outerWidth(true);g=J.outerHeight(true);W=this._tickPoints[aa][0]-aO*(this._tickPoints[aa][2]-Math.PI)/Math.PI-an*Math.cos(this._tickPoints[aa][2]);T=this._tickPoints[aa][1]-g/2+g/2*Math.pow(Math.abs((Math.sin(this._tickPoints[aa][2]))),0.5)+an/3*Math.pow(Math.abs((Math.sin(this._tickPoints[aa][2]))),0.5);J.css({left:W,top:T,color:this.tickColor});G=aO*Math.cos(this._tickPoints[aa][2])+g*Math.sin(Math.PI/2+this._tickPoints[aa][2]/2);n=(G>n)?G:n}}if(this.label&&this.labelPosition=="inside"){var W=this._center[0]+this.canvas._offsets.left;var an=this.tickPadding*(1-1/(this.diameter/80+1));var T=0.5*(this._center[1]+this.canvas._offsets.top-this.hubRadius)+0.5*(this._center[1]+this.canvas._offsets.top-this.tickOuterRadius+this.tickLength+an)+this.labelHeightAdjust;W-=this._labelElem.outerWidth(true)/2;T-=this._labelElem.outerHeight(true)/2;this._labelElem.css({left:W,top:T})}else{if(this.label&&this.labelPosition=="bottom"){var W=this._center[0]+this.canvas._offsets.left-this._labelElem.outerWidth(true)/2;var T=this._center[1]+this.canvas._offsets.top+this.innerPad+this.ringWidth+this.padding+this.labelHeightAdjust;this._labelElem.css({left:W,top:T})}}X.save();var ax=this.intervalInnerRadius||this.hubRadius*1.5;if(this.intervalOuterRadius==null){if(this.showTickLabels){var ag=(this.tickOuterRadius-this.tickLength-this.tickPadding-this.diameter/8)}else{var ag=(this.tickOuterRadius-this.tickLength-this.diameter/16)}}else{var ag=this.intervalOuterRadius}var P=this.max-this.min;var aD=this.intervals[this.intervals.length-1]-this.min;var y,Z,u=this.span*Math.PI/180;for(aa=0;aathis.max+R*3/this.span){ay=this.max+R*3/this.span}if(this.data[0][1]');var f=false,q=false,u,o;var w=p[0];if(w.show){var t=w.data;if(this.numberRows){u=this.numberRows;if(!this.numberColumns){o=Math.ceil(t.length/u)}else{o=this.numberColumns}}else{if(this.numberColumns){o=this.numberColumns;u=Math.ceil(t.length/this.numberColumns)}else{u=t.length;o=1}}var n,m,r,g,e,l,k,h;var v=0;for(n=0;n').prependTo(this._elem)}else{r=c('').appendTo(this._elem)}for(m=0;m0){f=true}else{f=false}}else{if(n==u-1){f=false}else{f=true}}k=(f)?this.rowSpacing:"0";g=c('
');e=c('');if(this.escapeHtml){e.text(l)}else{e.html(l)}if(q){e.prependTo(r);g.prependTo(r)}else{g.appendTo(r);e.appendTo(r)}f=true}v++}}}}return this._elem};function a(j,h,f){f=f||{};f.axesDefaults=f.axesDefaults||{};f.legend=f.legend||{};f.seriesDefaults=f.seriesDefaults||{};f.grid=f.grid||{};var e=false;if(f.seriesDefaults.renderer==c.jqplot.MeterGaugeRenderer){e=true}else{if(f.series){for(var g=0;gb.max||b.max==null){b.max=f[c][1]}}}else{for(var c=0;cb.max||b.max==null){b.max=f[c][2]}}}};a.jqplot.OHLCRenderer.prototype.draw=function(A,N,j){var J=this.data;var v=this._xaxis.min;var z=this._xaxis.max;var l=0;var K=J.length;var p=this._xaxis.series_u2p;var G=this._yaxis.series_u2p;var D,E,f,M,F,n,O,C;var y;var u=this.renderer;var s=(j!=undefined)?j:{};var k=(s.shadow!=undefined)?s.shadow:this.shadow;var B=(s.fill!=undefined)?s.fill:this.fill;var c=(s.fillAndStroke!=undefined)?s.fillAndStroke:this.fillAndStroke;u.bodyWidth=(s.bodyWidth!=undefined)?s.bodyWidth:u.bodyWidth;u.tickLength=(s.tickLength!=undefined)?s.tickLength:u.tickLength;A.save();if(this.show){var m,q,g,Q,t;for(var D=0;Dq){if(u.wickColor){y.color=u.wickColor}else{if(u.downBodyColor){y.color=u.downBodyColor}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,q]],f);u.shapeRenderer.draw(A,[[m,t],[m,Q]],f);y={};M=q;F=t-q;if(u.fillDownBody){y.fillRect=true}else{y.strokeRect=true;n=n-this.lineWidth;O=m-n/2}if(u.downBodyColor){y.color=u.downBodyColor;y.fillStyle=u.downBodyColor}C=[O,M,n,F]}else{if(u.wickColor){y.color=u.wickColor}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,Q]],f);y={};y.fillRect=false;y.strokeRect=false;O=[m-n/2,q];M=[m+n/2,t];n=null;F=null;C=[O,M]}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,C,f)}else{E=s.color;if(u.openColor){s.color=u.openColor}if(!u.hlc){u.shapeRenderer.draw(A,[[m-u._tickLength,q],[m,q]],s)}s.color=E;if(u.wickColor){s.color=u.wickColor}u.shapeRenderer.draw(A,[[m,g],[m,Q]],s);s.color=E;if(u.closeColor){s.color=u.closeColor}u.shapeRenderer.draw(A,[[m,t],[m+u._tickLength,t]],s);s.color=E}}}A.restore()};a.jqplot.OHLCRenderer.prototype.drawShadow=function(b,d,c){};a.jqplot.OHLCRenderer.checkOptions=function(d,c,b){if(!b.highlighter){b.highlighter={showMarker:false,tooltipAxes:"y",yvalues:4,formatString:'
date:%s
open:%s
hi:%s
low:%s
close:%s
'}}}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.pieRenderer.min.js b/docs/js/jqplot/plugins/jqplot.pieRenderer.min.js deleted file mode 100644 index 5f08e61..0000000 --- a/docs/js/jqplot/plugins/jqplot.pieRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(e){e.jqplot.PieRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.PieRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.PieRenderer.prototype.constructor=e.jqplot.PieRenderer;e.jqplot.PieRenderer.prototype.init=function(q,u){this.diameter=null;this.padding=20;this.sliceMargin=0;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this.dataLabelPositionFactor=0.52;this.dataLabelNudge=2;this.dataLabelCenterOn=true;this.startAngle=0;this.tickRenderer=e.jqplot.PieTickRenderer;this._drawData=true;this._type="pie";if(q.highlightMouseDown&&q.highlightMouseOver==null){q.highlightMouseOver=false}e.extend(true,this,q);if(this.sliceMargin<0){this.sliceMargin=0}this._diameter=null;this._radius=null;this._sliceAngles=[];this._highlightedPoint=null;if(this.highlightColors.length==0){for(var s=0;s570)?o[p]*0.8:o[p]+0.3*(255-o[p]);o[p]=parseInt(o[p],10)}this.highlightColors.push("rgb("+o[0]+","+o[1]+","+o[2]+")")}}this.highlightColorGenerator=new e.jqplot.ColorGenerator(this.highlightColors);u.postParseOptionsHooks.addOnce(m);u.postInitHooks.addOnce(g);u.eventListenerHooks.addOnce("jqplotMouseMove",b);u.eventListenerHooks.addOnce("jqplotMouseDown",a);u.eventListenerHooks.addOnce("jqplotMouseUp",l);u.eventListenerHooks.addOnce("jqplotClick",f);u.eventListenerHooks.addOnce("jqplotRightClick",n);u.postDrawHooks.addOnce(i)};e.jqplot.PieRenderer.prototype.setGridData=function(t){var p=[];var u=[];var o=this.startAngle/180*Math.PI;var s=0;this._drawData=false;for(var r=0;r0){p[r]+=p[r-1]}s+=this.data[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r0){p[r]+=p[r-1]}s+=t[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r0&&s>0.01&&s<6.282){w=parseFloat(p)/2/h(q)}return w}e.jqplot.PieRenderer.prototype.drawSlice=function(B,z,y,u,w){if(this._drawData){var p=this._radius;var A=this.fill;var x=this.lineWidth;var s=this.sliceMargin;if(this.fill==false){s+=this.lineWidth}B.save();B.translate(this._center[0],this._center[1]);var D=j(z,y,this.sliceMargin,this.fill,this.lineWidth);var o=D*Math.cos((z+y)/2);var C=D*Math.sin((z+y)/2);if((y-z)<=Math.PI){p-=D}else{p+=D}B.translate(o,C);if(w){for(var v=0,t=this.shadowDepth;v6.282+this.startAngle){y=6.282+this.startAngle;if(z>y){z=6.281+this.startAngle}}if(z>=y){return}B.beginPath();B.fillStyle=u;B.strokeStyle=u;B.lineWidth=x;B.arc(0,0,r,z,y,false);B.lineTo(0,0);B.closePath();if(A){B.fill()}else{B.stroke()}}};e.jqplot.PieRenderer.prototype.draw=function(B,z,E,o){var W;var H=(E!=undefined)?E:{};var t=0;var s=0;var N=1;var L=new e.jqplot.ColorGenerator(this.seriesColors);if(E.legendInfo&&E.legendInfo.placement=="insideGrid"){var J=E.legendInfo;switch(J.location){case"nw":t=J.width+J.xoffset;break;case"w":t=J.width+J.xoffset;break;case"sw":t=J.width+J.xoffset;break;case"ne":t=J.width+J.xoffset;N=-1;break;case"e":t=J.width+J.xoffset;N=-1;break;case"se":t=J.width+J.xoffset;N=-1;break;case"n":s=J.height+J.yoffset;break;case"s":s=J.height+J.yoffset;N=-1;break;default:break}}var K=(H.shadow!=undefined)?H.shadow:this.shadow;var A=(H.fill!=undefined)?H.fill:this.fill;var C=B.canvas.width;var I=B.canvas.height;var Q=C-t-2*this.padding;var X=I-s-2*this.padding;var M=Math.min(Q,X);var Y=M;this._sliceAngles=[];var v=this.sliceMargin;if(this.fill==false){v+=this.lineWidth}var q;var G=0;var R,aa,Z,ab;var D=this.startAngle/180*Math.PI;for(var W=0,V=z.length;WMath.PI){G=Math.max(q,G)}}if(this.diameter!=null&&this.diameter>0){this._diameter=this.diameter-2*G}else{this._diameter=Y-2*G}if(this._diameter<6){e.jqplot.log("Diameter of pie too small, not rendering.");return}var S=this._radius=this._diameter/2;this._center=[(C-N*t)/2+N*t+G*Math.cos(D),(I-N*s)/2+N*s+G*Math.sin(D)];if(this.shadow){for(var W=0,V=z.length;W=this.dataLabelThreshold){var F,U=(this._sliceAngles[W][0]+this._sliceAngles[W][1])/2,T;if(this.dataLabels=="label"){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,z[W][0])}else{if(this.dataLabels=="value"){F=this.dataLabelFormatString||"%d";T=e.jqplot.sprintf(F,this.data[W][1])}else{if(this.dataLabels=="percent"){F=this.dataLabelFormatString||"%d%%";T=e.jqplot.sprintf(F,z[W][2]*100)}else{if(this.dataLabels.constructor==Array){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,this.dataLabels[W])}}}}var p=(this._radius)*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var P=this._center[0]+Math.cos(U)*p+this.canvas._offsets.left;var O=this._center[1]+Math.sin(U)*p+this.canvas._offsets.top;var u=e('
'+T+"
").insertBefore(o.eventCanvas._elem);if(this.dataLabelCenterOn){P-=u.width()/2;O-=u.height()/2}else{P-=u.width()*Math.sin(U/2);O-=u.height()/2}P=Math.round(P);O=Math.round(O);u.css({left:P,top:O})}}};e.jqplot.PieAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PieAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PieAxisRenderer.prototype.constructor=e.jqplot.PieAxisRenderer;e.jqplot.PieAxisRenderer.prototype.init=function(o){this.tickRenderer=e.jqplot.PieTickRenderer;e.extend(true,this,o);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.PieLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.PieLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.PieLegendRenderer.prototype.constructor=e.jqplot.PieLegendRenderer;e.jqplot.PieLegendRenderer.prototype.init=function(o){this.numberRows=null;this.numberColumns=null;e.extend(true,this,o)};e.jqplot.PieLegendRenderer.prototype.draw=function(){var r=this;if(this.show){var B=this._series;this._elem=e(document.createElement("table"));this._elem.addClass("jqplot-table-legend");var E={position:"absolute"};if(this.background){E.background=this.background}if(this.border){E.border=this.border}if(this.fontSize){E.fontSize=this.fontSize}if(this.fontFamily){E.fontFamily=this.fontFamily}if(this.textColor){E.textColor=this.textColor}if(this.marginTop!=null){E.marginTop=this.marginTop}if(this.marginBottom!=null){E.marginBottom=this.marginBottom}if(this.marginLeft!=null){E.marginLeft=this.marginLeft}if(this.marginRight!=null){E.marginRight=this.marginRight}this._elem.css(E);var I=false,A=false,o,y;var C=B[0];var p=new e.jqplot.ColorGenerator(C.seriesColors);if(C.show){var J=C.data;if(this.numberRows){o=this.numberRows;if(!this.numberColumns){y=Math.ceil(J.length/o)}else{y=this.numberColumns}}else{if(this.numberColumns){y=this.numberColumns;o=Math.ceil(J.length/this.numberColumns)}else{o=J.length;y=1}}var H,G;var q,w,v;var x,z,F;var D=0;var u,t;for(H=0;H0){I=true}else{I=false}}else{if(H==o-1){I=false}else{I=true}}z=(I)?this.rowSpacing:"0";w=e(document.createElement("td"));w.addClass("jqplot-table-legend jqplot-table-legend-swatch");w.css({textAlign:"center",paddingTop:z});u=e(document.createElement("div"));u.addClass("jqplot-table-legend-swatch-outline");t=e(document.createElement("div"));t.addClass("jqplot-table-legend-swatch");t.css({backgroundColor:F,borderColor:F});w.append(u.append(t));v=e(document.createElement("td"));v.addClass("jqplot-table-legend jqplot-table-legend-label");v.css("paddingTop",z);if(this.escapeHtml){v.text(x)}else{v.html(x)}if(A){v.prependTo(q);w.prependTo(q)}else{w.appendTo(q);v.appendTo(q)}I=true}D++}}}}return this._elem};e.jqplot.PieRenderer.prototype.handleMove=function(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];r.target.trigger("jqplotDataMouseOver",o);if(r.series[o[0]].highlightMouseOver&&!(o[0]==r.plugins.pieRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){r.target.trigger("jqplotDataHighlight",o);d(r,o[0],o[1])}}else{if(s==null){k(r)}}};function c(s,r,p){p=p||{};p.axesDefaults=p.axesDefaults||{};p.legend=p.legend||{};p.seriesDefaults=p.seriesDefaults||{};var o=false;if(p.seriesDefaults.renderer==e.jqplot.PieRenderer){o=true}else{if(p.series){for(var q=0;qB||s+C>m){z.remove()}z=null;f=null}}};c.jqplot.postSeriesInitHooks.push(c.jqplot.PointLabels.init);c.jqplot.postDrawSeriesHooks.push(c.jqplot.PointLabels.draw)})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js b/docs/js/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js deleted file mode 100644 index e559ddc..0000000 --- a/docs/js/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(e){e.jqplot.PyramidAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PyramidAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PyramidAxisRenderer.prototype.constructor=e.jqplot.PyramidAxisRenderer;e.jqplot.PyramidAxisRenderer.prototype.init=function(f){this.position=null;this.drawBaseline=true;this.baselineWidth=null;this.baselineColor=null;this.tickSpacingFactor=25;this._type="pyramid";this._splitAxis=false;this._splitLength=null;this.category=false;this._autoFormatString="";this._overrideFormatString=false;e.extend(true,this,f);this.renderer.options=f;this.resetDataBounds=this.renderer.resetDataBounds;this.resetDataBounds()};e.jqplot.PyramidAxisRenderer.prototype.resetDataBounds=function(){var h=this._dataBounds;h.min=null;h.max=null;var g;for(var m=0;mh.max)||h.max===null){h.max=g}}else{g=o[k][0];if((g!==null&&gh.max)||h.max===null){h.max=g}}}}};e.jqplot.PyramidAxisRenderer.prototype.draw=function(f,n){if(this.show){this.renderer.createTicks.call(this,n);var m=0;var g;if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=e(document.createElement("div"));this._elem.addClass("jqplot-axis jqplot-"+this.name);this._elem.css("position","absolute");if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var l=this._label.draw(f,n);l.appendTo(this._elem);l=null}var k=this._ticks;var j;for(var h=0;hr){I=this.numberTicks-1;for(H=2;H0;H--){v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[H-1].value+this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks[H].showGridline=false;this._ticks[H].showMark=false;this._ticks.splice(H,0,v)}v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[0].value-this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks.unshift(v);v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[this._ticks.length-1].value+this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks.push(v);this.tickInterval=this.tickInterval/2;this.numberTicks=this._ticks.length;this.min=this._ticks[0].value;this.max=this._ticks[this._ticks.length-1].value}}else{if(this.name.charAt(0)==="x"){E=this._plotDimensions.width;var w=Math.max(M.max,Math.abs(M.min));var u=Math.min(M.min,-w);B=u;G=w;y=G-B;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}m=30;g=Math.max(E,m+1);j=(g-m)/300;O=e.jqplot.LinearTickGenerator(B,G,j);A=B+y*(this.padMin-1);F=G-y*(this.padMax-1);if(BF){A=B-y*(this.padMin-1);F=G+y*(this.padMax-1);O=e.jqplot.LinearTickGenerator(A,F,j)}this.min=O[0];this.max=O[1];this.numberTicks=O[2];this._autoFormatString=O[3];this.tickInterval=O[4]}else{E=this._plotDimensions.height;B=M.min;G=M.max;x=this._series[0];this._ticks=[];y=G-B;if(d[y]){y+=1;G+=1}this.max=G;this.min=B;r=Math.round(2+E/this.tickSpacingFactor);if(y+1<=r){this.numberTicks=y+1;this.tickInterval=1}else{for(var H=r;H>1;H--){if(y/(H-1)===Math.round(y/(H-1))){this.numberTicks=H;this.tickInterval=y/(H-1);break}}}}if(this._overrideFormatString&&this._autoFormatString!=""){this.tickOptions=this.tickOptions||{};this.tickOptions.formatString=this._autoFormatString}var f;for(H=0;Ho){o=j}}}if(this.name==="yMidAxis"){for(m=0;m0){f=-q._textRenderer.height*Math.cos(-q._textRenderer.angle)/2}else{f=-q.getHeight()+q._textRenderer.height*Math.cos(q._textRenderer.angle)/2}break;case"middle":f=-q.getHeight()/2;break;default:f=-q.getHeight()/2;break}}else{f=-q.getHeight()/2}var C=this.u2p(q.value)+f+"px";q._elem.css("top",C);q.pack()}}if(r){var y=this._label._elem.outerHeight(true);if(this.name!=="yMidAxis"){this._label._elem.css("top",o-k/2-y/2+"px")}if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{if(this.name!=="yMidAxis"){this._label._elem.css("right","0px")}}this._label.pack()}}}B=null}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.pyramidGridRenderer.min.js b/docs/js/jqplot/plugins/jqplot.pyramidGridRenderer.min.js deleted file mode 100644 index e2837a6..0000000 --- a/docs/js/jqplot/plugins/jqplot.pyramidGridRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(a){a.jqplot.PyramidGridRenderer=function(){a.jqplot.CanvasGridRenderer.call(this)};a.jqplot.PyramidGridRenderer.prototype=new a.jqplot.CanvasGridRenderer();a.jqplot.PyramidGridRenderer.prototype.constructor=a.jqplot.PyramidGridRenderer;a.jqplot.CanvasGridRenderer.prototype.init=function(c){this._ctx;this.plotBands={show:false,color:"rgb(230, 219, 179)",axis:"y",start:null,interval:10};a.extend(true,this,c);var b={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(b)};a.jqplot.PyramidGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var D=this._ctx;var G=this._axes;var q=G.xaxis.u2p;var J=G.yMidAxis.u2p;var l=G.xaxis.max/1000;var u=q(0);var f=q(l);var r=["xaxis","yaxis","x2axis","y2axis","yMidAxis"];D.save();D.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);D.fillStyle=this.backgroundColor||this.background;D.fillRect(this._left,this._top,this._width,this._height);if(this.plotBands.show){D.save();var c=this.plotBands;D.fillStyle=c.color;var d;var o,n,p,I;if(c.axis.charAt(0)==="x"){if(G.xaxis.show){d=G.xaxis}}else{if(c.axis.charAt(0)==="y"){if(G.yaxis.show){d=G.yaxis}else{if(G.y2axis.show){d=G.y2axis}else{if(G.yMidAxis.show){d=G.yMidAxis}}}}}if(d!==undefined){var g=c.start;if(g===null){g=d.min}for(var H=g;H0;H--){var O=r[H-1];var d=G[O];var M=d._ticks;var B=M.length;if(d.show){if(d.drawBaseline){var N={};if(d.baselineWidth!==null){N.lineWidth=d.baselineWidth}if(d.baselineColor!==null){N.strokeStyle=d.baselineColor}switch(O){case"xaxis":if(G.yMidAxis.show){z(this._left,this._bottom,u,this._bottom,N);z(f,this._bottom,this._right,this._bottom,N)}else{z(this._left,this._bottom,this._right,this._bottom,N)}break;case"yaxis":z(this._left,this._bottom,this._left,this._top,N);break;case"yMidAxis":z(u,this._bottom,u,this._top,N);z(f,this._bottom,f,this._top,N);break;case"x2axis":if(G.yMidAxis.show){z(this._left,this._top,u,this._top,N);z(f,this._top,this._right,this._top,N)}else{z(this._left,this._bottom,this._right,this._bottom,N)}break;case"y2axis":z(this._right,this._bottom,this._right,this._top,N);break}}for(var E=B;E>0;E--){var v=M[E-1];if(v.show){var k=Math.round(d.u2p(v.value))+0.5;switch(O){case"xaxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(k,this._top,k,this._bottom)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._bottom;K=this._bottom+A;break;case"inside":L=this._bottom-A;K=this._bottom;break;case"cross":L=this._bottom-A;K=this._bottom+A;break;default:L=this._bottom;K=this._bottom+A;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[k,L],[k,K]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}z(k,L,k,K)}break;case"yaxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._right,k,this._left,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._left-A;K=this._left;break;case"inside":L=this._left;K=this._left+A;break;case"cross":L=this._left-A;K=this._left+A;break;default:L=this._left-A;K=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;case"yMidAxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._left,k,u,k);z(f,k,this._right,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;L=u;K=u+A;if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor});L=f-A;K=f;if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;case"x2axis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(k,this._bottom,k,this._top)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._top-A;K=this._top;break;case"inside":L=this._top;K=this._top+A;break;case"cross":L=this._top-A;K=this._top+A;break;default:L=this._top-A;K=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[k,L],[k,K]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}z(k,L,k,K)}break;case"y2axis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._left,k,this._right,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._right;K=this._right+A;break;case"inside":L=this._right-A;K=this._right;break;case"cross":L=this._right-A;K=this._right+A;break;default:L=this._right;K=this._right+A;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;default:break}}}v=null}d=null;M=null}D.restore();function z(j,i,e,b,h){D.save();h=h||{};if(h.lineWidth==null||h.lineWidth!=0){a.extend(true,D,h);D.beginPath();D.moveTo(j,i);D.lineTo(e,b);D.stroke()}D.restore()}if(this.shadow){if(G.yMidAxis.show){var F=[[this._left,this._bottom],[u,this._bottom]];this.renderer.shadowRenderer.draw(D,F);var F=[[f,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(D,F);var F=[[u,this._bottom],[u,this._top]];this.renderer.shadowRenderer.draw(D,F)}else{var F=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(D,F)}}if(this.borderWidth!=0&&this.drawBorder){if(G.yMidAxis.show){z(this._left,this._top,u,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(f,this._top,this._right,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:G.y2axis.borderColor,lineWidth:G.y2axis.borderWidth});z(this._right,this._bottom,f,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(u,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth});z(u,this._bottom,u,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth});z(f,this._bottom,f,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth})}else{z(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:G.y2axis.borderColor,lineWidth:G.y2axis.borderWidth});z(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth})}}D.restore();D=null;G=null}})(jQuery); \ No newline at end of file diff --git a/docs/js/jqplot/plugins/jqplot.pyramidRenderer.min.js b/docs/js/jqplot/plugins/jqplot.pyramidRenderer.min.js deleted file mode 100644 index 5833af5..0000000 --- a/docs/js/jqplot/plugins/jqplot.pyramidRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(c){if(c.jqplot.PyramidAxisRenderer===undefined){c.ajax({url:c.jqplot.pluginLocation+"jqplot.pyramidAxisRenderer.js",dataType:"script",async:false})}if(c.jqplot.PyramidGridRenderer===undefined){c.ajax({url:c.jqplot.pluginLocation+"jqplot.pyramidGridRenderer.js",dataType:"script",async:false})}c.jqplot.PyramidRenderer=function(){c.jqplot.LineRenderer.call(this)};c.jqplot.PyramidRenderer.prototype=new c.jqplot.LineRenderer();c.jqplot.PyramidRenderer.prototype.constructor=c.jqplot.PyramidRenderer;c.jqplot.PyramidRenderer.prototype.init=function(j,o){j=j||{};this._type="pyramid";this.barPadding=10;this.barWidth=null;this.fill=true;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.highlightThreshold=2;this.synchronizeHighlight=false;this.offsetBars=false;if(j.highlightMouseDown&&j.highlightMouseOver==null){j.highlightMouseOver=false}this.side="right";c.extend(true,this,j);if(this.side==="left"){this._highlightThreshold=[[-this.highlightThreshold,0],[-this.highlightThreshold,0],[0,0],[0,0]]}else{this._highlightThreshold=[[0,0],[0,0],[this.highlightThreshold,0],[this.highlightThreshold,0]]}this.renderer.options=j;this._highlightedPoint=null;this._dataColors=[];this._barPoints=[];this.fillAxis="y";this._primaryAxis="_yaxis";this._xnudge=0;var n={lineJoin:"miter",lineCap:"butt",fill:this.fill,fillRect:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill,lineWidth:this.lineWidth};this.renderer.shapeRenderer.init(n);var m=j.shadowOffset;if(m==null){if(this.lineWidth>2.5){m=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{m=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var h={lineJoin:"miter",lineCap:"butt",fill:this.fill,fillRect:this.fill,isarc:false,angle:this.shadowAngle,offset:m,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill,lineWidth:this.lineWidth};this.renderer.shadowRenderer.init(h);o.postDrawHooks.addOnce(f);o.eventListenerHooks.addOnce("jqplotMouseMove",e);if(this.side==="left"){for(var k=0,g=this.data.length;k=0){s=I[E][0]-L;F=this.barWidth;D=[L,n-y-r,s,F]}else{s=L-I[E][0];F=this.barWidth;D=[I[E][0],n-y-r,s,F]}this._barPoints.push([[D[0],D[1]+F],[D[0],D[1]],[D[0]+s,D[1]],[D[0]+s,D[1]+F]]);if(p){this.renderer.shadowRenderer.draw(B,D)}var g=u.fillStyle||this.color;this._dataColors.push(g);this.renderer.shapeRenderer.draw(B,D,u)}else{if(E===0){D=[[L,j],[I[E][0],j],[I[E][0],I[E][1]-y-r]]}else{if(E=h.synchronizeHighlight&&h.synchronizeHighlight!==l){h=m.series[h.synchronizeHighlight];k={fillStyle:h.highlightColors[j],fillRect:false};h.renderer.shapeRenderer.draw(g._ctx,h._barPoints[j],k)}g=null}function d(j){var g=j.plugins.pyramidRenderer.highlightCanvas;g._ctx.clearRect(0,0,g._ctx.canvas.width,g._ctx.canvas.height);for(var h=0;h)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, -Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& -(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, -a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== -"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, -function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; -var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, -parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= -false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= -s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, -applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; -else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, -a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== -w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, -cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= -c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); -a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, -function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); -k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), -C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= -e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& -f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; -if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", -e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, -"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, -d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, -e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); -t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| -g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, -text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, -setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= -h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== -"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, -h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& -q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); -(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: -function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= -{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", -d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, -""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); -return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", -""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= -c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? -c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= -function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= -Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, -"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= -a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= -a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== -"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, -serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), -function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, -global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& -e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? -"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== -false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= -false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", -c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| -d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); -g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== -1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== -"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; -if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== -"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| -c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; -this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= -this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, -e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; -a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); -c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, -d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- -f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": -"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in -e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/docs/js/jquery-1.7.1.min.js b/docs/js/jquery-1.7.1.min.js deleted file mode 100644 index 6ede59c..0000000 --- a/docs/js/jquery-1.7.1.min.js +++ /dev/null @@ -1,9270 +0,0 @@ -/* - * Downloaded from http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js, 2012-02-04 23:26 - */ - -/*! - * jQuery JavaScript Library v1.7.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Nov 21 21:11:03 2011 -0500 - */ -(function( window, undefined ) { - -// Use the correct document accordingly with window argument (sandbox) -var document = window.document, - navigator = window.navigator, - location = window.location; -var jQuery = (function() { - -// Define a local copy of jQuery -var jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // A central reference to the root jQuery(document) - rootjQuery, - - // A simple way to check for HTML strings or ID strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Matches dashed string for camelizing - rdashAlpha = /-([a-z]|[0-9])/ig, - rmsPrefix = /^-ms-/, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // The deferred used on DOM ready - readyList, - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = quickExpr.exec( selector ); - } - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context ? context.ownerDocument || context : document ); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.7.1", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = this.constructor(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // Add the callback - readyList.add( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - // Either a released hold or an DOMready/load event and not yet ready - if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.fireWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).off( "ready" ); - } - } - }, - - bindReady: function() { - if ( readyList ) { - return; - } - - readyList = jQuery.Callbacks( "once memory" ); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - // A crude way of determining if an object is a window - isWindow: function( obj ) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction( object ); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { - break; - } - } - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type( array ); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array, i ) { - var len; - - if ( array ) { - if ( indexOf ) { - return indexOf.call( array, elem, i ); - } - - len = array.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in array && array[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - if ( typeof context === "string" ) { - var tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - var args = slice.call( arguments, 2 ), - proxy = function() { - return fn.apply( context, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can optionally be executed if it's a function - access: function( elems, key, value, exec, fn, pass ) { - var length = elems.length; - - // Setting many attributes - if ( typeof key === "object" ) { - for ( var k in key ) { - jQuery.access( elems, k, key[k], exec, fn, value ); - } - return elems; - } - - // Setting one attribute - if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = !pass && exec && jQuery.isFunction(value); - - for ( var i = 0; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - - return elems; - } - - // Getting an attribute - return length ? fn( elems[0], key ) : undefined; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - sub: function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -return jQuery; - -})(); - - -// String to Object flags format cache -var flagsCache = {}; - -// Convert String-formatted flags into Object-formatted ones and store in cache -function createFlags( flags ) { - var object = flagsCache[ flags ] = {}, - i, length; - flags = flags.split( /\s+/ ); - for ( i = 0, length = flags.length; i < length; i++ ) { - object[ flags[i] ] = true; - } - return object; -} - -/* - * Create a callback list using the following parameters: - * - * flags: an optional list of space-separated flags that will change how - * the callback list behaves - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible flags: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( flags ) { - - // Convert flags from String-formatted to Object-formatted - // (we check in cache first) - flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; - - var // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = [], - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Add one or several callbacks to the list - add = function( args ) { - var i, - length, - elem, - type, - actual; - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = jQuery.type( elem ); - if ( type === "array" ) { - // Inspect recursively - add( elem ); - } else if ( type === "function" ) { - // Add if not in unique mode and callback is not in - if ( !flags.unique || !self.has( elem ) ) { - list.push( elem ); - } - } - } - }, - // Fire callbacks - fire = function( context, args ) { - args = args || []; - memory = !flags.memory || [ context, args ]; - firing = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { - memory = true; // Mark as halted - break; - } - } - firing = false; - if ( list ) { - if ( !flags.once ) { - if ( stack && stack.length ) { - memory = stack.shift(); - self.fireWith( memory[ 0 ], memory[ 1 ] ); - } - } else if ( memory === true ) { - self.disable(); - } else { - list = []; - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - var length = list.length; - add( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away, unless previous - // firing was halted (stopOnFalse) - } else if ( memory && memory !== true ) { - firingStart = length; - fire( memory[ 0 ], memory[ 1 ] ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - var args = arguments, - argIndex = 0, - argLength = args.length; - for ( ; argIndex < argLength ; argIndex++ ) { - for ( var i = 0; i < list.length; i++ ) { - if ( args[ argIndex ] === list[ i ] ) { - // Handle firingIndex and firingLength - if ( firing ) { - if ( i <= firingLength ) { - firingLength--; - if ( i <= firingIndex ) { - firingIndex--; - } - } - } - // Remove the element - list.splice( i--, 1 ); - // If we have some unicity property then - // we only need to do this once - if ( flags.unique ) { - break; - } - } - } - } - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - if ( list ) { - var i = 0, - length = list.length; - for ( ; i < length; i++ ) { - if ( fn === list[ i ] ) { - return true; - } - } - } - return false; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory || memory === true ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( stack ) { - if ( firing ) { - if ( !flags.once ) { - stack.push( [ context, args ] ); - } - } else if ( !( flags.once && memory ) ) { - fire( context, args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!memory; - } - }; - - return self; -}; - - - - -var // Static reference to slice - sliceDeferred = [].slice; - -jQuery.extend({ - - Deferred: function( func ) { - var doneList = jQuery.Callbacks( "once memory" ), - failList = jQuery.Callbacks( "once memory" ), - progressList = jQuery.Callbacks( "memory" ), - state = "pending", - lists = { - resolve: doneList, - reject: failList, - notify: progressList - }, - promise = { - done: doneList.add, - fail: failList.add, - progress: progressList.add, - - state: function() { - return state; - }, - - // Deprecated - isResolved: doneList.fired, - isRejected: failList.fired, - - then: function( doneCallbacks, failCallbacks, progressCallbacks ) { - deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); - return this; - }, - always: function() { - deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); - return this; - }, - pipe: function( fnDone, fnFail, fnProgress ) { - return jQuery.Deferred(function( newDefer ) { - jQuery.each( { - done: [ fnDone, "resolve" ], - fail: [ fnFail, "reject" ], - progress: [ fnProgress, "notify" ] - }, function( handler, data ) { - var fn = data[ 0 ], - action = data[ 1 ], - returned; - if ( jQuery.isFunction( fn ) ) { - deferred[ handler ](function() { - returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - }); - } else { - deferred[ handler ]( newDefer[ action ] ); - } - }); - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - if ( obj == null ) { - obj = promise; - } else { - for ( var key in promise ) { - obj[ key ] = promise[ key ]; - } - } - return obj; - } - }, - deferred = promise.promise({}), - key; - - for ( key in lists ) { - deferred[ key ] = lists[ key ].fire; - deferred[ key + "With" ] = lists[ key ].fireWith; - } - - // Handle state - deferred.done( function() { - state = "resolved"; - }, failList.disable, progressList.lock ).fail( function() { - state = "rejected"; - }, doneList.disable, progressList.lock ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( firstParam ) { - var args = sliceDeferred.call( arguments, 0 ), - i = 0, - length = args.length, - pValues = new Array( length ), - count = length, - pCount = length, - deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? - firstParam : - jQuery.Deferred(), - promise = deferred.promise(); - function resolveFunc( i ) { - return function( value ) { - args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - if ( !( --count ) ) { - deferred.resolveWith( deferred, args ); - } - }; - } - function progressFunc( i ) { - return function( value ) { - pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - deferred.notifyWith( promise, pValues ); - }; - } - if ( length > 1 ) { - for ( ; i < length; i++ ) { - if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { - args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); - } else { - --count; - } - } - if ( !count ) { - deferred.resolveWith( deferred, args ); - } - } else if ( deferred !== firstParam ) { - deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); - } - return promise; - } -}); - - - - -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - marginDiv, - fragment, - tds, - events, - eventName, - i, - isSupported, - div = document.createElement( "div" ), - documentElement = document.documentElement; - - // Preliminary tests - div.setAttribute("className", "t"); - div.innerHTML = "
a"; - - all = div.getElementsByTagName( "*" ); - a = div.getElementsByTagName( "a" )[ 0 ]; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement( "select" ); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName( "input" )[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent( "onclick" ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute("type", "radio"); - support.radioValue = input.value === "t"; - - input.setAttribute("checked", "checked"); - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - div.innerHTML = ""; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - if ( window.getComputedStyle ) { - marginDiv = document.createElement( "div" ); - marginDiv.style.width = "0"; - marginDiv.style.marginRight = "0"; - div.style.width = "2px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; - } - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for( i in { - submit: 1, - change: 1, - focusin: 1 - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - fragment.removeChild( div ); - - // Null elements to avoid leaks in IE - fragment = select = opt = marginDiv = div = input = null; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, outer, inner, table, td, offsetSupport, - conMarginTop, ptlm, vb, style, html, - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - conMarginTop = 1; - ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;"; - vb = "visibility:hidden;border:0;"; - style = "style='" + ptlm + "border:5px solid #000;padding:0;'"; - html = "
" + - "" + - "
"; - - container = document.createElement("div"); - container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "
t
"; - tds = div.getElementsByTagName( "td" ); - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Figure out if the W3C box model works as expected - div.innerHTML = ""; - div.style.width = div.style.paddingLeft = "1px"; - jQuery.boxModel = support.boxModel = div.offsetWidth === 2; - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.style.display = "inline"; - div.style.zoom = 1; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = ""; - div.innerHTML = "
"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); - } - - div.style.cssText = ptlm + vb; - div.innerHTML = html; - - outer = div.firstChild; - inner = outer.firstChild; - td = outer.nextSibling.firstChild.firstChild; - - offsetSupport = { - doesNotAddBorder: ( inner.offsetTop !== 5 ), - doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) - }; - - inner.style.position = "fixed"; - inner.style.top = "20px"; - - // safari subtracts parent border width here which is 5px - offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); - inner.style.position = inner.style.top = ""; - - outer.style.overflow = "hidden"; - outer.style.position = "relative"; - - offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); - offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); - - body.removeChild( container ); - div = container = null; - - jQuery.extend( support, offsetSupport ); - }); - - return support; -})(); - - - - -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var privateCache, thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, - isEvents = name === "events"; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - privateCache = thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Users should not attempt to inspect the internal events object using jQuery.data, - // it is undocumented and subject to change. But does anyone listen? No. - if ( isEvents && !thisCache[ name ] ) { - return privateCache.events; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - // Reference to internal data cache key - internalKey = jQuery.expando, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - - // See jQuery.data for more information - id = isNode ? elem[ internalKey ] : internalKey; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split( " " ); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject(cache[ id ]) ) { - return; - } - } - - // Browsers that fail expando deletion also refuse to delete expandos on - // the window, but it will allow it on all other JS objects; other browsers - // don't care - // Ensure that `cache` is not a window object #10080 - if ( jQuery.support.deleteExpando || !cache.setInterval ) { - delete cache[ id ]; - } else { - cache[ id ] = null; - } - - // We destroyed the cache and need to eliminate the expando on the node to avoid - // false lookups in the cache for entries that no longer exist - if ( isNode ) { - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( jQuery.support.deleteExpando ) { - delete elem[ internalKey ]; - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - } else { - elem[ internalKey ] = null; - } - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, attr, name, - data = null; - - if ( typeof key === "undefined" ) { - if ( this.length ) { - data = jQuery.data( this[0] ); - - if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) { - attr = this[0].attributes; - for ( var i = 0, l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( this[0], name, data[ name ] ); - } - } - jQuery._data( this[0], "parsedAttrs", true ); - } - } - - return data; - - } else if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - // Try to fetch any internally stored data first - if ( data === undefined && this.length ) { - data = jQuery.data( this[0], key ); - data = dataAttr( this[0], key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - - } else { - return this.each(function() { - var self = jQuery( this ), - args = [ parts[0], value ]; - - self.triggerHandler( "setData" + parts[1] + "!", args ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + parts[1] + "!", args ); - }); - } - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - jQuery.isNumeric( data ) ? parseFloat( data ) : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - for ( var name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - - - - -function handleQueueMarkDefer( elem, type, src ) { - var deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - defer = jQuery._data( elem, deferDataKey ); - if ( defer && - ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && - ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { - // Give room for hard-coded callbacks to fire first - // and eventually mark/queue something else on the element - setTimeout( function() { - if ( !jQuery._data( elem, queueDataKey ) && - !jQuery._data( elem, markDataKey ) ) { - jQuery.removeData( elem, deferDataKey, true ); - defer.fire(); - } - }, 0 ); - } -} - -jQuery.extend({ - - _mark: function( elem, type ) { - if ( elem ) { - type = ( type || "fx" ) + "mark"; - jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); - } - }, - - _unmark: function( force, elem, type ) { - if ( force !== true ) { - type = elem; - elem = force; - force = false; - } - if ( elem ) { - type = type || "fx"; - var key = type + "mark", - count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); - if ( count ) { - jQuery._data( elem, key, count ); - } else { - jQuery.removeData( elem, key, true ); - handleQueueMarkDefer( elem, type, "mark" ); - } - } - }, - - queue: function( elem, type, data ) { - var q; - if ( elem ) { - type = ( type || "fx" ) + "queue"; - q = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !q || jQuery.isArray(data) ) { - q = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - q.push( data ); - } - } - return q || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = {}; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - jQuery._data( elem, type + ".run", hooks ); - fn.call( elem, function() { - jQuery.dequeue( elem, type ); - }, hooks ); - } - - if ( !queue.length ) { - jQuery.removeData( elem, type + "queue " + type + ".run", true ); - handleQueueMarkDefer( elem, type, "queue" ); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - } - - if ( data === undefined ) { - return jQuery.queue( this[0], type ); - } - return this.each(function() { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, object ) { - if ( typeof type !== "string" ) { - object = type; - type = undefined; - } - type = type || "fx"; - var defer = jQuery.Deferred(), - elements = this, - i = elements.length, - count = 1, - deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - tmp; - function resolve() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - } - while( i-- ) { - if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || - ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || - jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && - jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { - count++; - tmp.add( resolve ); - } - } - resolve(); - return defer.promise(); - } -}); - - - - -var rclass = /[\n\t\r]/g, - rspace = /\s+/, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - nodeHook, boolHook, fixSpecified; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.attr ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.prop ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classNames, i, l, elem, className, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - classNames = ( value || "" ).split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - className = (" " + elem.className + " ").replace( rclass, " " ); - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[ c ] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var self = jQuery(this), val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, l, - i = 0; - - if ( value && elem.nodeType === 1 ) { - attrNames = value.toLowerCase().split( rspace ); - l = attrNames.length; - - for ( ; i < l; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - - // See #9699 for explanation of this approach (setting first, then removal) - jQuery.attr( elem, name, "" ); - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( rboolean.test( name ) && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) -jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? - ret.nodeValue : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.nodeValue = value + "" ); - } - }; - - // Apply the nodeHook to tabindex - jQuery.attrHooks.tabindex.set = nodeHook.set; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); - - - - -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, - rhoverHack = /\bhover(\.\S+)?\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, - quickParse = function( selector ) { - var quick = rquickIs.exec( selector ); - if ( quick ) { - // 0 1 2 3 - // [ _, tag, id, class ] - quick[1] = ( quick[1] || "" ).toLowerCase(); - quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); - } - return quick; - }, - quickIs = function( elem, m ) { - var attrs = elem.attributes || {}; - return ( - (!m[1] || elem.nodeName.toLowerCase() === m[1]) && - (!m[2] || (attrs.id || {}).value === m[2]) && - (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) - ); - }, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, quick, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - quick: quickParse( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), - t, tns, type, origType, namespaces, origCount, - j, events, special, handle, eventType, handleObj; - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, [ "events", "handle" ], true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var type = event.type || event, - namespaces = [], - cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - old = null; - for ( ; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old && old === elem.ownerDocument ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments, 0 ), - run_all = !event.exclusive && !event.namespace, - handlerQueue = [], - i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Determine handlers that should run if there are delegated events - // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this.ownerDocument || this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = ( - handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) - ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) - if ( event.metaKey === undefined ) { - event.metaKey = event.ctrlKey; - } - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector, - ret; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !form._submit_attached ) { - jQuery.event.add( form, "submit._submit", function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - }); - form._submit_attached = true; - } - }); - // return undefined since we don't need an event listener - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - jQuery.event.simulate( "change", this, event, true ); - } - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - elem._change_attached = true; - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on.call( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - var handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( var type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); - - - -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - expando = "sizcache" + (Math.random() + '').replace('.', ''), - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rReturn = /\r\n/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context, seed ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set, seed ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set, i, len, match, type, left; - - if ( !expr ) { - return []; - } - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - type, found, item, filter, left, - i, pass, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - filter = Expr.filter[ type ]; - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - pass = not ^ found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Utility function for retreiving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var i, node, - nodeType = elem.nodeType, - ret = ""; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 ) { - // Use textContent || innerText for elements - if ( typeof elem.textContent === 'string' ) { - return elem.textContent; - } else if ( typeof elem.innerText === 'string' ) { - // Replace IE's carriage returns - return elem.innerText.replace( rReturn, '' ); - } else { - // Traverse it's children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - } else { - - // If no nodeType, this is expected to be an array - for ( i = 0; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - if ( node.nodeType !== 8 ) { - ret += getText( node ); - } - } - } - return ret; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - - checkbox: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - - file: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - - password: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - - submit: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - - image: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - - reset: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - - button: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - }, - - focus: function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var first, last, - doneName, parent, cache, - count, diff, - type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - first = match[2]; - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - doneName = match[0]; - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { - count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent[ expando ] = doneName; - } - - diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Sizzle.attr ? - Sizzle.attr( elem, name ) : - Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - !type && Sizzle.attr ? - result != null : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = ""; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = ""; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "

"; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "
"; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem[ expando ] === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem[ expando ] = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem[ expando ] === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem[ expando ] = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context, seed ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet, seed ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -Sizzle.selectors.attrMap = {}; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var self = this, - i, l; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - var ret = this.pushStack( "", "find", selector ), - length, n, r; - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - POS.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - // Array (deprecated as of jQuery 1.7) - if ( jQuery.isArray( selectors ) ) { - var level = 1; - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( i = 0; i < selectors.length; i++ ) { - - if ( jQuery( cur ).is( selectors[ i ] ) ) { - ret.push({ selector: selectors[ i ], elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - - return ret; - } - - // String - var pos = POS.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( elem.parentNode.firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} - - - - -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /", "" ], - legend: [ 1, "
", "
" ], - thead: [ 1, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - col: [ 2, "", "
" ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize and - - - - - - - - - - - - - - - -
- - - -
-
- -
- -
- - - -
No markers have been found in this project.
- -
-
-
-
-
- - - - diff --git a/docs/namespaces/Flutterwave.Rave.html b/docs/namespaces/Flutterwave.Rave.html deleted file mode 100644 index bb0265c..0000000 --- a/docs/namespaces/Flutterwave.Rave.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - » \Flutterwave\Rave - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
-
- -
- -
- -
- - - - - - -
-

Classes, interfaces and traits

- -
-

EventHandlerInterface¶

-

Implement this interface to set triggers for transaction event on Rave.

-
-

An event can be triggered when a Rave initializes a transaction, When a -transaction is successful, failed, requeried and when a requery fails.

-
- « More »
- - -
- - -
-
-
- - - - diff --git a/docs/namespaces/Flutterwave.html b/docs/namespaces/Flutterwave.html deleted file mode 100644 index 16200bf..0000000 --- a/docs/namespaces/Flutterwave.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - » \Flutterwave - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
-
- -
- -
- -
- - - - - - -
-

Classes, interfaces and traits

- - -
-

Rave¶

-

Flutterwave's Rave payment gateway PHP SDK

-
- -
- « More »
- -
- - - - - - - -
-

Classes, interfaces and traits

- -
-

EventHandlerInterface¶

-

Implement this interface to set triggers for transaction event on Rave.

-
-

An event can be triggered when a Rave initializes a transaction, When a -transaction is successful, failed, requeried and when a requery fails.

-
- « More »
- - -
- - - -
-
-
- - - - diff --git a/docs/namespaces/default.html b/docs/namespaces/default.html deleted file mode 100644 index e5af3c0..0000000 --- a/docs/namespaces/default.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - » \ - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
-
- -
- -
- -
- - - - - - - - -
-

Classes, interfaces and traits

- - -
-

Rave¶

-

Flutterwave's Rave payment gateway PHP SDK

-
- -
- « More »
- -
- - - - - - - -
-

Classes, interfaces and traits

- -
-

EventHandlerInterface¶

-

Implement this interface to set triggers for transaction event on Rave.

-
-

An event can be triggered when a Rave initializes a transaction, When a -transaction is successful, failed, requeried and when a requery fails.

-
- « More »
- - -
- - - - -
-
-
- - - - diff --git a/docs/packages/default.html b/docs/packages/default.html deleted file mode 100644 index e637e4a..0000000 --- a/docs/packages/default.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - » - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
-
- -
- -
- -
- - - - - - - - - - -
-

Classes, interfaces and traits

- -
-

EventHandlerInterface¶

-

Implement this interface to set triggers for transaction event on Rave.

-
An event can be triggered when a Rave initializes a transaction, When a -transaction is successful, failed, requeried and when a requery fails.
- « More » -
- - -
-

Rave¶

-

Flutterwave's Rave payment gateway PHP SDK

-
- « More » -
- -
- - - -
-
-
- - - - diff --git a/docs/phpdoc-cache-2e/phpdoc-cache-settings.dat b/docs/phpdoc-cache-2e/phpdoc-cache-settings.dat deleted file mode 100644 index 27a6584..0000000 Binary files a/docs/phpdoc-cache-2e/phpdoc-cache-settings.dat and /dev/null differ diff --git a/docs/phpdoc-cache-48/phpdoc-cache-file_62a3242662a071158a4e86b7224af888.dat b/docs/phpdoc-cache-48/phpdoc-cache-file_62a3242662a071158a4e86b7224af888.dat deleted file mode 100644 index 0dd03cb..0000000 Binary files a/docs/phpdoc-cache-48/phpdoc-cache-file_62a3242662a071158a4e86b7224af888.dat and /dev/null differ diff --git a/docs/phpdoc-cache-eb/phpdoc-cache-file_c4042193263f11f57da814f4c0030189.dat b/docs/phpdoc-cache-eb/phpdoc-cache-file_c4042193263f11f57da814f4c0030189.dat deleted file mode 100644 index 43bc6a9..0000000 Binary files a/docs/phpdoc-cache-eb/phpdoc-cache-file_c4042193263f11f57da814f4c0030189.dat and /dev/null differ diff --git a/examples/account.php b/examples/account.php new file mode 100644 index 0000000..fa879ba --- /dev/null +++ b/examples/account.php @@ -0,0 +1,78 @@ + 2000, + "currency" => Flutterwave\Util\Currency::NGN, + "tx_ref" => uniqid().time(), + "additionalData" => [ + "account_details" => [ + "account_bank" => "044", + "account_number" => "0690000034", + "country" => "NG" + ] + ], + ]; + + $accountpayment = \Flutterwave\Flutterwave::create("account"); + $customerObj = $accountpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + $payload = $accountpayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray('account')); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $accountpayment->initiate($payload); +// $instruction = $result['instruction']; +// require __DIR__."/examples/view/form/pin.php"; + } + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + +
+
+

Account Payment Sample

+ +
+ +
+
+ + +
+
+
+ + + diff --git a/examples/ach.php b/examples/ach.php new file mode 100644 index 0000000..3c75806 --- /dev/null +++ b/examples/ach.php @@ -0,0 +1,75 @@ + 2000, + "currency" => Flutterwave\Util\Currency::ZAR, + "tx_ref" => uniqid().time(), + "redirectUrl" => "https://google.com" + ]; + + $achpayment = \Flutterwave\Flutterwave::create("ach"); + $customerObj = $achpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + $payload = $achpayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray()); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $achpayment->initiate($payload); +// $instruction = $result['instruction']; +// require __DIR__."/examples/view/form/pin.php"; + } + + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + +
+
+

Ach Payment Sample

+ +
+ +
+
+ + +
+
+
+ + + diff --git a/examples/apple.php b/examples/apple.php new file mode 100644 index 0000000..73a4b63 --- /dev/null +++ b/examples/apple.php @@ -0,0 +1,77 @@ + 2000, + "currency" => Flutterwave\Util\Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => "https://google.com" + ]; + + $data['redirectUrl'] = "http://{$_SERVER['HTTP_HOST']}/examples/endpoint/verify.php?tx_ref={$data['tx_ref']}"; + + $applepayment = \Flutterwave\Flutterwave::create("apple"); + $customerObj = $applepayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $applepayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray()); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $applepayment->initiate($payload); +// print_r($result); + + if($result['mode'] == AuthMode::REDIRECT){ + header("Location: ".$result['url']); + } + } + } + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + +
+
+

ApplePay Payment Sample

+ +
+ +
+
+ +
+
+ + +
+
+
+ + + diff --git a/examples/assets/css/index.css b/examples/assets/css/index.css new file mode 100644 index 0000000..ad9fb8e --- /dev/null +++ b/examples/assets/css/index.css @@ -0,0 +1,45 @@ +.buttons { + display: flex; + flex-direction: column; + justify-content: center; + align-content: center; +} + +.cta { + margin-top: 1em; + justify-content: center; + align-content: center; + gap: 2em; +} + +form, .pin-form { + text-align: center; +} + +.error{ + color: red; +} + +.bank-info{ + display: flex; + flex-direction: column; + justify-content: center; + align-content: center; + margin-bottom: .5em; +} + +.request { + width: 100%; + min-height: 1.5rem; + font-family: "Lucida Console", Monaco, monospace; + font-size: 0.8rem; + line-height: 1.2; +} + +.progress { + width: 100%; + min-height: 1.5rem; + font-family: "Lucida Console", Monaco, monospace; + font-size: 0.8rem; + line-height: 1.2; +} \ No newline at end of file diff --git a/examples/assets/js/index.js b/examples/assets/js/index.js new file mode 100644 index 0000000..39b160b --- /dev/null +++ b/examples/assets/js/index.js @@ -0,0 +1,22 @@ +$('.make-payment').on('click', ()=> { + $('.request').text('Processing Payment...'); +}); + + +$('.confirm-bank-transfer').on('click', (evt) => { + evt.preventDefault(); + + window.location = `${window.location.origin}/examples/endpoint/verify.php?transactionId=${reference}`; + +}) + +$('.confirm-xaf-transfer-momo').on('click', (evt) => { + evt.preventDefault(); + + window.location = `${window.location.origin}/examples/endpoint/verify.php?tx_ref=${reference}`; +}) + +$('.check-payment-status').on('click', (evt) => { + evt.preventDefault(); + window.location.reload(); +} ) \ No newline at end of file diff --git a/examples/banktransfer.php b/examples/banktransfer.php new file mode 100644 index 0000000..d8060ad --- /dev/null +++ b/examples/banktransfer.php @@ -0,0 +1,82 @@ + 2000, + "currency" => Flutterwave\Util\Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => "https://google.com" + ]; + + $btpayment = \Flutterwave\Flutterwave::create("bank-transfer"); + $customerObj = $btpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $btpayment->payload->create($data); + $payload->set('is_permanent', 1); // for permanent; + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray()); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $btpayment->initiate($payload); + $instruction = ($result['instruction'] !== "N/A") ? $result['instruction'] : "Please make a Transfer Payment to the Account Below."; + $transfer_reference = $result['transfer_reference']; + $transfer_account = $result['transfer_account']; + $transfer_bank = $result['transfer_bank']; + $account_expiration = $result['account_expiration']; + $transfer_amount = $result['transfer_amount']; + $response_display = require __DIR__."/view/form/banktransfer.php"; + } + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + +
+
+

Bank Transfer Payment Sample

+ +
+ +
+
+ +
+
+ + +
+
+
+ + + diff --git a/examples/card.php b/examples/card.php new file mode 100644 index 0000000..653926c --- /dev/null +++ b/examples/card.php @@ -0,0 +1,140 @@ + 2000, + "currency" => Currency::NGN, + "tx_ref" => $tx_ref, + "redirectUrl" => "http://{$_SERVER['HTTP_HOST']}/examples/endpoint/verify.php?tx_ref={$tx_ref}", + "additionalData" => [ + "subaccounts" => [ + ["id" => "RSA_345983858845935893"] + ], + "meta" => [ + "unique_id" => uniqid().uniqid() + ], + "preauthorize" => false, + "payment_plan" => null, + "card_details" => [ +// "card_number" => "5531886652142950", +// "cvv" => "564", +// "expiry_month" => "09", +// "expiry_year" => "32", + "card_number" => "4556052704172643", + "cvv" => "899", + "expiry_month" => "01", + "expiry_year" => "23" + ] + ], + ]; + + $cardpayment = \Flutterwave\Flutterwave::create("card"); + + $customerObj = $cardpayment->customer->create([ + "full_name" => "Olaobaju Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + $payload = $cardpayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray('card')); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $cardpayment->initiate($payload); + + if($result['mode'] === AuthMode::PIN){ + $instruction = $result['instruction']; + require __DIR__."/view/form/pin.php"; + } + + if($result['mode'] === AuthMode::AVS){ + $instruction = $result['instruction']; + require __DIR__."/view/form/avs.php"; + } + } + + if(isset($request['pin'])){ + $payload->set("authorization", [ + "mode" => AuthMode::PIN, + AuthMode::PIN => $request['pin'] + ]); + + $result = $cardpayment->initiate($payload); + + switch ($result['mode']){ + case 'redirect': + header("Location:".$result['url']); + break; + case 'otp': + require __DIR__."/view/form/otp.php"; + break; + } + + } + + if(isset($request['address'])){ + $avs_data = [ + "mode" => AuthMode::AVS, + "city" => $request['city'], + "address" => $request['address'], + "state" => $request['state'], + "country" => $request['country'], + "zipcode" => $request['zipcode'] + ]; + + $payload->set("authorization", $avs_data); + $result = $cardpayment->initiate($payload); + + switch ($result['mode']){ + case 'redirect': + header("Location:".$result['url']); + break; + case 'otp': + require __DIR__."/view/form/otp.php"; + break; + } + } + + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + + +
+
+

Card Payment Sample

+ +
+ +
+
+ + +
+
+
+ + diff --git a/examples/endpoint/await-hook.php b/examples/endpoint/await-hook.php new file mode 100644 index 0000000..8c50d3d --- /dev/null +++ b/examples/endpoint/await-hook.php @@ -0,0 +1,28 @@ +verify($id)->data; + $verified = 1; + } catch (\Exception $e) { +// echo "error: {$e->getMessage()}"; + } +} + +if(is_array($body) && !empty($body)) +{ + echo "Payment Status: Successful"; +} diff --git a/examples/endpoint/validate.php b/examples/endpoint/validate.php new file mode 100644 index 0000000..b1065fe --- /dev/null +++ b/examples/endpoint/validate.php @@ -0,0 +1,31 @@ +Sample Validate Endpoint"; +$dev_instructions .= "

Simply make a post request to this route with both \"otp\" and \"flw_ref\" as the request body."; + +################################################################################################################################### +require __DIR__."/../../vendor/autoload.php"; + +$data = $_POST; + +if(count($data) == 0){ + echo $dev_instructions; +} + +if (isset($data['otp']) && isset($data['flw_ref'])) +{ + $otp = $data['otp']; + $flw_ref = $data['flw_ref']; + + try { + $res = (\Flutterwave\Service\Transactions::validate($otp, $flw_ref)); + + if ($res->status === 'success') { + echo "Your payment status: " . $res->processor_response; + } + } catch (\Unirest\Exception $e) { + + echo "error: ". $e->getMessage(); + } + +} \ No newline at end of file diff --git a/examples/endpoint/verify.php b/examples/endpoint/verify.php new file mode 100644 index 0000000..0f0c113 --- /dev/null +++ b/examples/endpoint/verify.php @@ -0,0 +1,114 @@ +Sample Verify Endpoint"; +$dev_instructions .= "

Simply make a get request to this route with either \"transactionId\" or \"tx_ref\" as the query parameter."; +########################################################################################################################################### +require __DIR__."/../../vendor/autoload.php"; + +$data = $_GET; + +if(count($data) == 0){ + echo $dev_instructions; +} + +if (isset($data['transactionId']) || isset($data['tx_ref']) ) +{ + $transactionId = $data['transactionId'] ?? null; + $tx_ref = $data['tx_ref'] ?? null; + + try { + $transactionService = (new \Flutterwave\Service\Transactions()); + + if(!is_null($transactionId)){ + $res = $transactionService->verify($transactionId); + }else{ + $res = $transactionService->verifyWithTxref($tx_ref); + } + + if ($res->status === 'success') { + + #TODO: get the record of the payment from your store or DB and confirm the amount and currency are the same before giving value. + + echo ''; + echo "Your payment status: " . $res->data->processor_response; + echo "

Note: if transaction is pending, try using the re-check button below.

"; + echo "
"; + echo ""; + echo ""; + } + } catch (\Exception $e) { + + echo "error: ". $e->getMessage(); + } + +} + +if(isset($data['resp'])) +{ + $resp = json_decode($data['resp'], true); + $transactionId = $resp['data']['id'] ?? null; + $tx_ref = $resp['data']['tx_ref'] ?? null; + + try { + $transactionService = (new \Flutterwave\Service\Transactions()); + + if(!is_null($transactionId)){ + $res = $transactionService->verify($transactionId); + }else{ + $res = $transactionService->verifyWithTxref($tx_ref); + } + + if ($res->status === 'success') { + + #TODO: get the record of the payment from your store or DB and confirm the amount and currency are the same before giving value. + + echo ''; + echo "Your payment status: " . ucfirst($res->data->status); + echo "

Note: if transaction is pending, try using the re-check button below.

"; + echo "
"; + echo ""; + echo ""; + } + } catch (\Exception $e) { + + echo "error: ". $e->getMessage(); + } +} + +// For Card Verification +if(isset($data['response'])){ + $resp = json_decode($data['response'], true); + $transactionId = $resp['id'] ?? null; + $tx_ref = $resp['txRef'] ?? null; + + try { + $transactionService = (new \Flutterwave\Service\Transactions()); + + if(!is_null($transactionId)){ + $res = $transactionService->verify($transactionId); + }else{ + $res = $transactionService->verifyWithTxref($tx_ref); + } + + if ($res->status === 'success') { + + #TODO: get the record of the payment from your store or DB and confirm the amount and currency are the same before giving value. + + echo ''; + echo "Your payment status: " . ucfirst($res->data->status); + echo "

Note: if transaction is pending, try using the re-check button below.

"; + echo "
"; + echo ""; + echo ""; + } + } catch (\Exception $e) { + + echo "error: ". $e->getMessage(); + } +} diff --git a/examples/index.php b/examples/index.php new file mode 100644 index 0000000..38741ae --- /dev/null +++ b/examples/index.php @@ -0,0 +1,3 @@ + 2000, + "currency" => Flutterwave\Util\Currency::ZMW, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "network" => "MTN", + ] + ]; + + $data['redirectUrl'] = "http://{$_SERVER['HTTP_HOST']}/examples/endpoint/verify.php?tx_ref={$data['tx_ref']}"; + + $customerObj = $momopayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $momopayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray()); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $momopayment->initiate($payload); +// print_r($result); + + if($result['mode'] == AuthMode::CALLBACK){ + $instruction = $result['instruction']; + + $reference = $data["tx_ref"]; + + $response_display = ""; + $response_display .= $instruction; + $response_display .= "
and
confirm your transaction"; + $response_display .= << + SCRIPT; + $response_display .= "
"; + + } + + if($result['mode'] == AuthMode::REDIRECT){ + header("Location: ".$result['url']); + } + } + + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + +
+
+

Momo Payment Sample

+ +
+ +
+
+ +
+
+ + +
+
+
+ + + diff --git a/examples/mpesa.php b/examples/mpesa.php new file mode 100644 index 0000000..b618c77 --- /dev/null +++ b/examples/mpesa.php @@ -0,0 +1,75 @@ + 2000, + "currency" => Flutterwave\Util\Currency::KES, + "tx_ref" => uniqid().time(), + "redirectUrl" => "https://google.com" + ]; + + $mpesapayment = \Flutterwave\Flutterwave::create("mpesa"); + $customerObj = $mpesapayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $mpesapayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray()); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $mpesapayment->initiate($payload); + $instruction = $result['instruction']; + $transactionId = $result['transactionId']; + $response_display = require __DIR__."/view/form/mpesa.php"; + } + + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + +
+
+

Mpesa Payment Sample

+ +
+ +
+
+ +
+
+ + +
+
+
+ + + diff --git a/examples/preauth.php b/examples/preauth.php new file mode 100644 index 0000000..63eaea1 --- /dev/null +++ b/examples/preauth.php @@ -0,0 +1,112 @@ + 2000, + "currency" => Flutterwave\Util\Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "subaccounts" => [ + ["id" => "RSA_345983858845935893"] + ], + "meta" => [ + "unique_id" => uniqid().uniqid() + ], + "payment_plan" => null, + "card_details" => [ + "card_number" => "5531886652142950", + "cvv" => "564", + "expiry_month" => "09", + "expiry_year" => "32" + ] + ], + ]; + + $data['redirectUrl'] = "http://{$_SERVER['HTTP_HOST']}/examples/endpoint/verify.php?tx_ref={$data['tx_ref']}"; + + $customerObj = $preauthpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $preauthpayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray()); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $preauthpayment->initiate($payload); + $instruction = $result['instruction']; + require __DIR__."/view/form/pin.php"; + } + + if(isset($request[Payload::PIN])){ + $payload->set(Payload::PIN,$request['pin']); + $result = $preauthpayment->initiate($payload); + + switch ($result['mode']){ + case 'redirect': + header("Location:".$result['url']); + break; + case 'otp': + require __DIR__."/view/form/otp.php"; + break; + } + + } + + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + + +
+
+

Preauth Payment Sample

+ +
+ +
+
+ +
+
+ + +
+
+
+ + + + \ No newline at end of file diff --git a/examples/tokenized.php b/examples/tokenized.php new file mode 100644 index 0000000..0d9ab61 --- /dev/null +++ b/examples/tokenized.php @@ -0,0 +1,83 @@ + 2000, + "currency" => Flutterwave\Util\Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "token" => "flw-t0-fe20067f9d8d3ce3d06f93ea2d2fea28-m03k" + ] + ]; + + $data['redirectUrl'] = "http://{$_SERVER['HTTP_HOST']}/examples/endpoint/verify.php?tx_ref={$data['tx_ref']}"; + + $customerObj = $tokenpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $tokenpayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray()); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $tokenpayment->initiate($payload); + if($result['status']){ + $response_display = "Payment {$result['status']}"; + } + } + + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + +
+
+

Tokenized Payment Sample

+ +
+ +
+
+ +
+
+ + +
+
+
+ + + diff --git a/examples/ussd.php b/examples/ussd.php new file mode 100644 index 0000000..ecaf22a --- /dev/null +++ b/examples/ussd.php @@ -0,0 +1,100 @@ + 2000, + "currency" => Flutterwave\Util\Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "account_bank" => "044", + "account_number" => "0000000000000" + ] + ]; + + $data['redirectUrl'] = "http://{$_SERVER['HTTP_HOST']}/examples/endpoint/verify.php?tx_ref={$data['tx_ref']}"; + + $customerObj = $ussdpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $ussdpayment->payload->create($data); + + if(!empty($_REQUEST)) + { + $request = $_REQUEST; + + if(isset($request['view'])){ + $json = json_encode($payload->toArray()); + $request_display = $json; + } + + if(isset($request['make'])){ + $result = $ussdpayment->initiate($payload); + + if($result['mode'] == AuthMode::USSD){ + $instruction = $result['instruction']; + $reference = $result["tx_ref"]; + $code = $result["code"]; + $response_display = "Dail the USSD code "; + $response_display .= $instruction." and use the payment code $code"; + $response_display .= "
and
confirm your transaction"; + $response_display .= << + SCRIPT; + $response_display .= "
"; + +// header("Location: /examples/endpoint/verify.php?tx_ref="); + + } + + } + + } + + +} catch (Exception $e) { + $error = $e->getMessage(); +} + +?> + +
+
+

USSD Payment Sample

+ +
+ +
+
+ +
+
+ + +
+
+
+ + + diff --git a/examples/view/form/avs.php b/examples/view/form/avs.php new file mode 100644 index 0000000..7f0411c --- /dev/null +++ b/examples/view/form/avs.php @@ -0,0 +1,18 @@ + +

$instruction

+
+ + + + + + + +
+ +HTML; + +echo $html; \ No newline at end of file diff --git a/examples/view/form/banktransfer.php b/examples/view/form/banktransfer.php new file mode 100644 index 0000000..042e113 --- /dev/null +++ b/examples/view/form/banktransfer.php @@ -0,0 +1,19 @@ + $instruction +
+ REFERENCE: $transfer_reference; + ACCOUNT: $transfer_account; + BANK: $transfer_bank; + AMOUNT: $transfer_amount; + EXPIRES: $account_expiration; +
+ + +HTML; + +return $html; \ No newline at end of file diff --git a/examples/view/form/card.php b/examples/view/form/card.php new file mode 100644 index 0000000..492ddaf --- /dev/null +++ b/examples/view/form/card.php @@ -0,0 +1,135 @@ + + + + + + + + +
+

Enter your payment details

+
+
+
+
+
+ + + + + + + + + + + 0123 4567 8910 1112 + JOHN DOE + cardholder name + expiration + card number + + 01/23 + VALID + THRU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + 985 + + security code + + + + John Doe + + +
+
+
+
+
+ + +
+
+ + + + + +
+
+ + +
+
+ + +
+
+ + + + diff --git a/examples/view/form/mpesa.php b/examples/view/form/mpesa.php new file mode 100644 index 0000000..bda5002 --- /dev/null +++ b/examples/view/form/mpesa.php @@ -0,0 +1,16 @@ + $instruction +
+ TransactionId: $transactionId; + STATUS: pending +
+ + +HTML; + +return $html; \ No newline at end of file diff --git a/examples/view/form/otp.php b/examples/view/form/otp.php new file mode 100644 index 0000000..5afaaff --- /dev/null +++ b/examples/view/form/otp.php @@ -0,0 +1,16 @@ + +

$instruction

+
+ + + +
+ +HTML; + +echo $html; \ No newline at end of file diff --git a/examples/view/form/pin.php b/examples/view/form/pin.php new file mode 100644 index 0000000..cc5fdcd --- /dev/null +++ b/examples/view/form/pin.php @@ -0,0 +1,17 @@ + +

$instruction

+
+ + + +
+ +HTML; + +echo $html; + +//echo "
";
+//print_r($_SERVER);
\ No newline at end of file
diff --git a/library/AccountPayment.php b/library/AccountPayment.php
deleted file mode 100644
index e698c3a..0000000
--- a/library/AccountPayment.php
+++ /dev/null
@@ -1,77 +0,0 @@
-payment = new Rave($_ENV['SECRET_KEY']);
-        $this->type = array('debit_uk_account', 'debit_ng_account');
-        $this->valType = "account";
-    }
-
-    function accountCharge($array)
-    {
-        //set the payment handler
-
-        //add tx_ref to the paylaod
-        if (empty($array['tx_ref'])) {
-            $array['tx_ref'] = $this->payment->txref;
-        } else {
-            $this->payment->txref = $array['tx_ref'];
-        }
-
-
-        if (!in_array($array['type'], $this->type)) {
-            echo '';
-        }
-
-
-        $this->payment->eventHandler(new AccountEventHandler);
-        //set the endpoint for the api call
-        if ($this->type === $this->type[0]) {
-            $this->payment->setEndPoint("v3/charges?type=debit_uk_account");
-        } else {
-            $this->payment->setEndPoint("v3/charges?type=debit_ng_account");
-        }
-
-        AccountEventHandler::startRecording();
-        $response = $this->payment->chargePayment($array);
-        AccountEventHandler::sendAnalytics('Initiate-Account-Charge');
-
-        return $response;
-    }
-
-    function validateTransaction($otp, $ref)
-    {
-        //validate the charge
-        $this->payment->eventHandler(new AccountEventHandler);
-
-        return $this->payment->validateTransaction($otp, $ref, $this->payment->type);//Uncomment this line if you need it
-
-    }
-
-    function return_txref()
-    {
-        return $this->payment->txref;
-    }
-
-    function verifyTransaction($id)
-    {
-        //verify the charge
-        return $this->payment->verifyTransaction($id);//Uncomment this line if you need it
-
-    }
-}
-
-
-
diff --git a/library/AchPayment.php b/library/AchPayment.php
deleted file mode 100644
index 49776ee..0000000
--- a/library/AchPayment.php
+++ /dev/null
@@ -1,55 +0,0 @@
-payment = new Rave($_ENV['SECRET_KEY']);
-
-
-    }
-
-    function achCharge($array)
-    {
-
-        if (empty($array['tx_ref'])) {
-            $array['tx_ref'] = $this->payment->txref;
-        } else {
-            $this->payment->txref = $array['tx_ref'];
-        }
-
-        $this->payment->type = 'ach_payment';
-        //set the payment handler
-        $this->payment->eventHandler(new AchEventHandler)
-            //set the endpoint for the api call
-            ->setEndPoint("v3/charges?type=" . $this->payment->type);
-        //returns the value from the results
-        //$result = $this->payment->chargePayment($array);
-
-        AchEventHandler::startRecording();
-        $result = $this->payment->chargePayment($array);
-        AchEventHandler::sendAnalytics('Initiate-Ach-Payment');
-        return $result;
-
-        //change this
-    }
-
-
-    function verifyTransaction($id)
-    {
-        //verify the charge
-        return $this->payment->verifyTransaction($id);//Uncomment this line if you need it
-
-    }
-
-
-}
diff --git a/library/Bill.php b/library/Bill.php
deleted file mode 100644
index 1b07480..0000000
--- a/library/Bill.php
+++ /dev/null
@@ -1,178 +0,0 @@
-payment = new Rave($_ENV['SECRET_KEY']);
-        $this->type = array('AIRTIME', 'DSTV', 'DSTV BOX OFFICE', 'Postpaid', 'Prepaid', 'AIRTEL', 'IKEDC TOP UP', 'EKEDC POSTPAID TOPUP', 'EKEDC PREPAID TOPUP', 'LCC', 'KADUNA TOP UP');
-    }
-
-    function payBill($array)
-    {
-        if (gettype($array['amount']) !== 'integer') {
-            return '';
-        }
-
-        if (!in_array($array['type'], $this->type, true)) {
-            return '';
-        }
-        switch ($array['type']) {
-            case 'DSTV':
-                //set type to dstv
-
-                $this->type = 'DSTV';
-
-                break;
-
-            case 'EKEDC POSTPAID TOPUP':
-                //set type to ekedc
-
-                $this->type = 'EKEDC POSTPAID TOPUP';
-
-                break;
-            case 'LCC':
-                //set type to lcc
-
-                $this->type = 'LCC';
-
-                break;
-            case 'AIRTEL':
-                //set type to airtel
-
-                $this->type = 'AIRTEL';
-
-                break;
-            case 'Postpaid':
-                //set type to postpaid
-
-                $this->type = 'Postpaid';
-
-                break;
-            case 'IKEDC TOP UP':
-                //set type to ikedc
-
-                $this->type = 'IKEDC TOP UP';
-
-                break;
-            case 'KADUNA TOP UP':
-                //set type to kaduna top up
-
-                $this->type = 'KADUNA TOP UP';
-
-                break;
-
-            case 'DSTV BOX OFFICE':
-                //set type to dstv box office
-                $this->type = 'DSTV BOX OFFICE';
-
-                break;
-
-            default:
-                //set type to airtime
-                $this->type = 'AIRTIME';
-
-                break;
-        }
-
-        $this->payment->eventHandler(new BillEventHandler)
-            //set the endpoint for the api call
-            ->setEndPoint("v3/bills");
-
-        BillEventHandler::startRecording();
-        $response = $this->payment->bill($array);
-        BillEventHandler::sendAnalytics("Pay-Bills");
-
-        return $response;
-    }
-
-    function bulkBill($array)
-    {
-        if (!array_key_exists('bulk_reference', $array) || !array_key_exists('callback_url', $array) || !array_key_exists('bulk_data', $array)) {
-            return '';
-        }
-
-        $this->payment->eventHandler(new BillEventHandler)
-            ->setEndPoint('v3/bulk-bills');
-
-        BillEventHandler::startRecording();
-        $response = $this->payment->bulkBills($array);
-        BillEventHandler::sendAnalytics("Pay-Bulk-Bills");
-
-        return $response;
-    }
-
-    function getBill($array)
-    {
-
-        $this->payment->eventHandler(new BillEventHandler);
-
-        if (array_key_exists('reference', $array) && !array_key_exists('from', $array)) {
-            echo "Im here";
-            $this->payment->setEndPoint('v3/bills/' . $array['reference']);
-        } else if (array_key_exists('code', $array) && !array_key_exists('customer', $array)) {
-            $this->payment->setEndPoint('v3/bill-items');
-        } else if (array_key_exists('id', $array) && array_key_exists('product_id', $array)) {
-            $this->payment->setEndPoint('v3/billers');
-        } else if (array_key_exists('from', $array) && array_key_exists('to', $array)) {
-            if (isset($array['page']) && isset($array['reference'])) {
-                $this->payment->setEndPoint('v3/bills');
-            } else {
-                $this->payment->setEndPoint('v3/bills');
-            }
-        }
-
-        BillEventHandler::startRecording();
-        $response = $this->payment->getBill($array);
-        BillEventHandler::sendAnalytics("Get-Bills");
-
-        return $response;
-    }
-
-    function getBillCategories()
-    {
-
-
-        $this->payment->eventHandler(new BillEventHandler)
-            ->setEndPoint('v3');
-
-        BillEventHandler::startRecording();
-        $response = $this->payment->getBillCategories();
-        BillEventHandler::sendAnalytics("Get-Bill-Categories");
-
-        return $response;
-    }
-
-    function getAgencies()
-    {
-        $this->payment->eventHandler(new BillEventHandler)
-            ->setEndPoint('v3');
-
-        BillEventHandler::startRecording();
-        $response = $this->payment->getBillers();
-        BillEventHandler::sendAnalytics("Get-Billing-Agencies");
-
-        return $response;
-    }
-}
-
-
-
-
-
-
-
-
diff --git a/library/Bvn.php b/library/Bvn.php
deleted file mode 100644
index 66a482b..0000000
--- a/library/Bvn.php
+++ /dev/null
@@ -1,33 +0,0 @@
-bvn = new Rave($_ENV['SECRET_KEY']);
-    }
-
-    function verifyBVN($bvn)
-    {
-        //set the payment handler
-        $this->bvn->eventHandler(new BvnEventHandler)
-            //set the endpoint for the api call
-            ->setEndPoint("v3/kyc/bvns");
-        //returns the value from the results
-
-        BvnEventHandler::startRecording();
-        $response= $this->bvn->bvn($bvn);
-        BvnEventHandler::sendAnalytics("Verify-BVN");
-
-        return $response;
-    }
-}
diff --git a/library/CardPayment.php b/library/CardPayment.php
deleted file mode 100644
index 957e8b0..0000000
--- a/library/CardPayment.php
+++ /dev/null
@@ -1,74 +0,0 @@
-payment = new Rave($_ENV['SECRET_KEY']);
-        $this->valType = "card";
-
-    }
-
-    function cardCharge($array) {
-        // echo "
";
-        // print_r($array);
-        // echo "
"; - // exit; - if (empty($array['tx_ref'])) { - $array['tx_ref'] = $this->payment->txref; - } else { - $this->payment->txref = $array['tx_ref']; - } - - $this->payment->type = 'card'; - //set the payment handler - $this->payment->eventHandler(new CardEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges?type=" . $this->payment->type); - //returns the value from the results - //$result = $this->payment->chargePayment($array); - - CardEventHandler::startRecording(); - $result = $this->payment->chargePayment($array); - CardEventHandler::setResponseTime(); - - return $result; - - //change this - } - - /**you will need to validate and verify the charge - * Validating the charge will require an otp - * After validation then verify the charge with the txRef - * You can write out your function to execute when the verification is successful in the onSuccessful function - ***/ - - function validateTransaction($element, $ref) { - //validate the charge - - return $this->payment->validateTransaction($element, $ref, $this->payment->type);//Uncomment this line if you need it - - - } - - function return_txref() { - return $this->payment->txref; - } - - function verifyTransaction($id) { - //verify the charge - return $this->payment->verifyTransaction($id);//Uncomment this line if you need it - - } - - -} - diff --git a/library/Ebill.php b/library/Ebill.php deleted file mode 100644 index 6a8205e..0000000 --- a/library/Ebill.php +++ /dev/null @@ -1,61 +0,0 @@ -eb = new Rave($_ENV['SECRET_KEY']); - $this->keys = array('amount', 'phone_number', 'country', 'ip', 'email'); - } - - function order($array) { - - if (empty($array['tx_ref'])) { - $array['tx_ref'] = $this->payment->txref; - } - - if (!isset($array['amount']) || !isset($array['phone_number']) || - !isset($array['email']) || !isset($array['country']) || !isset($array['ip'])) { - return ''; - } - - - $this->eb->eventHandler(new EbillEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/ebills"); - //returns the value of the result. - return $this->eb->createOrder($array); - } - - function updateOrder($data) { - - - if (!isset($data['amount'])) { - return ''; - } - - if (gettype($data['amount']) !== 'integer') { - $data['amount'] = (int)$data['amount']; - } - - - $this->eb->eventHandler(new EbillEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/ebills/" . $data['reference']); - //returns the value of the result. - return $this->eb->updateOrder($data); - } -} - - - - - diff --git a/library/EventHandlers/AccountEventHandler.php b/library/EventHandlers/AccountEventHandler.php deleted file mode 100644 index 71dd89e..0000000 --- a/library/EventHandlers/AccountEventHandler.php +++ /dev/null @@ -1,76 +0,0 @@ -onFailure($transactionData); - } - } - - /** - * This is called only when a transaction failed - * */ - function onFailure($transactionData) { - self::sendAnalytics("Initiate-Account-charge-error"); - // Get the transaction from your DB using the transaction reference (txref) - // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) - // You can also redirect to your failure page from here - - } - - /** - * This is called when a transaction is requeryed from the payment gateway - * */ - function onRequery($transactionReference) { - // Do something, anything! - } - - /** - * This is called a transaction requery returns with an error - * */ - function onRequeryError($requeryResponse) { - // Do something, anything! - } - - /** - * This is called when a transaction is canceled by the user - * */ - function onCancel($transactionReference) { - // Do something, anything! - // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - - } - - /** - * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. - * */ - function onTimeout($transactionReference, $data) { - // Get the transaction from your DB using the transaction reference (txref) - // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. - // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects - - } -} \ No newline at end of file diff --git a/library/EventHandlers/CardEventHandler.php b/library/EventHandlers/CardEventHandler.php deleted file mode 100644 index 28812ac..0000000 --- a/library/EventHandlers/CardEventHandler.php +++ /dev/null @@ -1,75 +0,0 @@ -onFailure($transactionData); - } - } - - /** - * This is called only when a transaction failed - * */ - function onFailure($transactionData) { - self::sendAnalytics("Initiate-Card-Payments-error"); - // Get the transaction from your DB using the transaction reference (txref) - // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) - // You can also redirect to your failure page from here - - } - - /** - * This is called when a transaction is requeryed from the payment gateway - * */ - function onRequery($transactionReference) { - // Do something, anything! - } - - /** - * This is called a transaction requery returns with an error - * */ - function onRequeryError($requeryResponse) { - // Do something, anything! - } - - /** - * This is called when a transaction is canceled by the user - * */ - function onCancel($transactionReference) { - // Do something, anything! - // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - - } - - /** - * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. - * */ - function onTimeout($transactionReference, $data) { - // Get the transaction from your DB using the transaction reference (txref) - // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. - // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects - - } -} \ No newline at end of file diff --git a/library/EventHandlers/EventTracker.php b/library/EventHandlers/EventTracker.php deleted file mode 100644 index cc04de7..0000000 --- a/library/EventHandlers/EventTracker.php +++ /dev/null @@ -1,48 +0,0 @@ - getenv('PUBLIC_KEY'), - "language" => "PHP V3", - "version" => "1.0.0", - "title" => $title, - "message" => self::$response_time - ]; - $body = Body::json($data); - Request::post($url, [], $body); - - self::resetTime(); - } - - private static function resetTime() { - self::$time_start = 0; - self::$response_time = 0; - } -} diff --git a/library/EventHandlers/PreEventHandler.php b/library/EventHandlers/PreEventHandler.php deleted file mode 100644 index 8c4a120..0000000 --- a/library/EventHandlers/PreEventHandler.php +++ /dev/null @@ -1,33 +0,0 @@ -misc = new Rave($_ENV['SECRET_KEY']); - } - - function getBalances() - { - $this->misc->setEndPoint("v3/balances");//set the endpoint for the api call - - - return $this->misc->getTransferBalance($array); - } - - function getBalance($array) - { - - if (!isset($array['currency'])) { - $array['currency'] = 'NGN'; - } - - - //set the payment handler - $this->misc->setEndPoint("v3/balances/" . $array['currency']); - - - return $this->misc->getTransferBalance($array); - - } - - function verifyAccount($array) - { - - //set the payment handler - $this->misc->setEndPoint("v3/accounts/resolve"); - - - return $this->misc->verifyAccount($array); - - } -} diff --git a/library/MobileMoney.php b/library/MobileMoney.php deleted file mode 100644 index 123512e..0000000 --- a/library/MobileMoney.php +++ /dev/null @@ -1,94 +0,0 @@ -payment = new Rave($_ENV['SECRET_KEY']); - $this->type = array("mobile_money_ghana", "mobile_money_uganda", "mobile_money_zambia", "mobile_money_rwanda", "mobile_money_franco"); - } - - function mobilemoney($array) - { - //add tx_ref to the paylaod - //add tx_ref to the paylaod - if (empty($array['tx_ref'])) { - $array['tx_ref'] = $this->payment->txref; - } - - $this->payment->type = 'momo'; - if (!in_array($array['type'], $this->type, true)) { - echo ''; - } - - switch ($array['type']) { - case 'mobile_money_ghana': - //set type to gh_momo - $this->type = 'mobile_money_ghana'; - break; - - case 'mobile_money_uganda': - //set type to ugx_momo - - $this->type = 'mobile_money_uganda'; - - break; - - case 'mobile_money_zambia': - //set type to xar_momo - $this->type = 'mobile_money_zambia'; - - break; - case 'mobile_money_franco': - //set type to xar_momo - $this->type = 'mobile_money_franco'; - - break; - - default: - //set type to momo - $this->type = 'mobile_money_rwanda'; - - break; - } - - //set the payment handler - $this->payment->eventHandler(new MomoEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges?type=" . $this->type); - //returns the value from the results - - MomoEventHandler::startRecording(); - $response = $this->payment->chargePayment($array); - - MomoEventHandler::setResponseTime(); - - return $response; - //echo 'Type selected: '.$this->type; - - - } - - /**you will need to verify the charge - * After validation then verify the charge with the txRef - * You can write out your function to execute when the verification is successful in the onSuccessful function - ***/ - function verifyTransaction($id) - { - //verify the charge - return $this->payment->verifyTransaction($id);//Uncomment this line if you need it - - } - - -} diff --git a/library/Mpesa.php b/library/Mpesa.php deleted file mode 100644 index 7154bd6..0000000 --- a/library/Mpesa.php +++ /dev/null @@ -1,49 +0,0 @@ -payment = new Rave($_SERVER['SECRET_KEY']); - $this->type = "mpesa"; - } - - function mpesa($array){ - - //add tx_ref to the paylaod - if(empty($array['tx_ref'])){ - $array['tx_ref'] = $this->payment->txref; - } - - - $this->payment->type = 'mpesa'; - - //set the payment handler - $this->payment->eventHandler(new MpesaEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges?type=".$this->payment->type); - //returns the value from the results - - MpesaEventHandler::startRecording(); - $response= $this->payment->chargePayment($array); - MpesaEventHandler::sendAnalytics('Initiate-Mpesa'); - - return $response; - } - - /**you will need to verify the charge - * After validation then verify the charge with the txRef - * You can write out your function to execute when the verification is successful in the onSuccessful function - ***/ - function verifyTransaction(){ - //verify the charge - return $this->payment->verifyTransaction($this->payment->txref);//Uncomment this line if you need it - } - - -} - - - diff --git a/library/PaymentPlan.php b/library/PaymentPlan.php deleted file mode 100644 index aeb6d91..0000000 --- a/library/PaymentPlan.php +++ /dev/null @@ -1,115 +0,0 @@ -plan = new Rave($_ENV['SECRET_KEY']); - } - - function createPlan($array) { - //set the payment handler - $this->plan->eventHandler(new PaymentPlanEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/payment-plans"); - - if (empty($array['amount']) || !array_key_exists('amount', $array) || - empty($array['name']) || !array_key_exists('name', $array) || - empty($array['interval']) || !array_key_exists('interval', $array) || - empty($array['duration']) || !array_key_exists('duration', $array)) { - - return ''; - } - - // if(!empty($array['amount'])){ - - // } - - //returns the value from the results - PaymentPlanEventHandler::startRecording(); - $response = $this->plan->createPlan($array); - PaymentPlanEventHandler::sendAnalytics('Initiate-Create-Plan'); - - return $response; - - } - - function updatePlan($array) { - - if (!isset($array['id']) || !isset($array['name']) || !isset($array['status'])) { - return ''; - } - - //set the payment handler - $this->plan->eventHandler(new PaymentPlanEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/payment-plans/" . $array['id']); - - PaymentPlanEventHandler::startRecording(); - $response = $this->plan->updatePlan($array); - PaymentPlanEventHandler::sendAnalytics('Initiate-Update-Plan'); - - return $response; - - } - - function cancelPlan($array) { - - if (!isset($array['id'])) { - return ''; - } - - //set the payment handler - $this->plan->eventHandler(new PaymentPlanEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/payment-plans/" . $array['id'] . "/cancel"); - - PaymentPlanEventHandler::startRecording(); - $response = $this->plan->cancelPlan($array); - PaymentPlanEventHandler::sendAnalytics('Initiate-Cancel-Plan'); - - return $response; - } - - function getPlans() { - //set the payment handler - $this->plan->eventHandler(new PaymentPlanEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/payment-plans"); - - PaymentPlanEventHandler::startRecording(); - $response = $this->plan->getPlans(); - PaymentPlanEventHandler::sendAnalytics('Get-Plans'); - - return $response; - } - - function get_a_Plan($array) { - //set the payment handler - $this->plan->eventHandler(new PaymentPlanEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/payment-plans/" . $array['id']); - - PaymentPlanEventHandler::startRecording(); - $response = $this->plan->get_a_Plan(); - PaymentPlanEventHandler::sendAnalytics('Get-A-Plan'); - - return $response; - } -} - diff --git a/library/Preauth.php b/library/Preauth.php deleted file mode 100644 index e3da9a0..0000000 --- a/library/Preauth.php +++ /dev/null @@ -1,123 +0,0 @@ -preauthPayment = new Rave($_ENV['SECRET_KEY']); - } - - function cardCharge($array) - { - // echo "
";
-        // print_r($array);
-        // echo "
"; - // exit; - $mode = ""; - if(empty($array['preauthorize'])) - { - $array['preauthorize'] = true; - } - - if(isset($array['usesecureauth']) && $array['usesecureauth']) - { - $mode = "VBVSECURECODE"; - } - - if (empty($array['tx_ref'])) { - $array['tx_ref'] = $this->preauthPayment->txref; - } else { - $this->preauthPayment->txref = $array['tx_ref']; - - } - - $this->preauthPayment->type = 'card'; - //set the payment handler - $this->preauthPayment->eventHandler(new PreEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges?type=" . $this->preauthPayment->type); - //returns the value from the results - //you can choose to store the returned value in a variable and validate within this function - $this->preauthPayment->setAuthModel("AUTH"); - - PreEventHandler::startRecording(); - $response = $this->preauthPayment->chargePayment($array); - PreEventHandler::sendAnalytics('Initiate-Preauth'); - - return $response; - /**you will need to validate and verify the charge - * Validating the charge will require an otp - * After validation then verify the charge with the txRef - * You can write out your function to execute when the verification is successful in the onSuccessful function - ***/ - } - - function captureFunds($array) - { - - if(isset($array['flw_ref']) && !empty($array['flw_ref'])){ - $flw_ref = $array['flw_ref']; - }else{ - $result['message'] = "Please pass the transaction flw_ref "; - return '
' . $result['message'] . '
';; - } - //set the payment handler - $this->preauthPayment->eventHandler(new PreEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges/$flw_ref/capture"); - //returns the value from the results - PreEventHandler::startRecording(); - $response = $this->preauthPayment->captureFunds($array); - PreEventHandler::sendAnalytics('Initiate-Capture-Funds'); - - return json_decode($response); - } - - function voidFunds($array) - { - if(isset($array['flw_ref']) && !empty($array['flw_ref'])){ - $flw_ref = $array['flw_ref']; - }else{ - $result['message'] = "Please pass the transaction flw_ref "; - return '
' . $result['message'] . '
';; - } - //set the payment handler - $this->preauthPayment->eventHandler(new PreEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges/$flw_ref/void"); - //returns the value from the results - PreEventHandler::startRecording(); - $response = $this->preauthPayment->void($array); - PreEventHandler::sendAnalytics('Initiate-Preauth-Void'); - - return json_decode($response); - - } - - function reFunds($array) - { - if(isset($array['flw_ref']) && !empty($array['flw_ref'])){ - $flw_ref = $array['flw_ref']; - }else{ - $result['message'] = "Please pass the transaction flw_ref "; - return '
' . $result['message'] . '
';; - } - //set the payment handler - $this->preauthPayment->eventHandler(new PreEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges/$flw_ref/refund"); - //returns the value from the results - PreEventHandler::startRecording(); - $response = $this->preauthPayment->preRefund($array); - PreEventHandler::sendAnalytics('Initiate-Preauth-Refund'); - - return json_decode($response); - - } - - -} diff --git a/library/Rave.php b/library/Rave.php deleted file mode 100644 index 501f1fe..0000000 --- a/library/Rave.php +++ /dev/null @@ -1,1642 +0,0 @@ -load(); - -/** - * Flutterwave's Rave payment gateway PHP SDK - * @author Olufemi Olanipekun - * @author Emereuwaonu Eze - * @version 1.0 - **/ -class Rave -{ - //Api keys - public $publicKey; - public $secretKey; - public $txref; - protected $integrityHash; - protected $payButtonText = 'Proceed with Payment'; - protected $redirectUrl; - protected $meta = array(); - //protected $env; - protected $transactionPrefix; - // public $logger; - protected $handler; - protected $stagingUrl = 'https://api.flutterwave.com'; - protected $liveUrl = 'https://api.flutterwave.com'; - protected $baseUrl; - protected $transactionData; - protected $overrideTransactionReference; - protected $requeryCount = 0; - - //Payment information - protected $account; - protected $accountno; - protected $key; - protected $pin; - protected $json_options; - protected $post_data; - protected $options; - protected $card_no; - protected $cvv; - protected $expiry_month; - protected $expiry_year; - protected $amount; - protected $paymentOptions = Null; - protected $customDescription; - protected $customLogo; - protected $customTitle; - protected $country; - protected $currency; - protected $customerEmail; - protected $customerFirstname; - protected $customerLastname; - protected $customerPhone; - - //EndPoints - protected $end_point; - protected $authModelUsed; - protected $flwRef; - public $type; - - /** - * Construct - * @param string $publicKey Your Rave publicKey. Sign up on https://rave.flutterwave.com to get one from your settings page - * @param string $secretKey Your Rave secretKey. Sign up on https://rave.flutterwave.com to get one from your settings page - * @param string $prefix This is added to the front of your transaction reference numbers - * @param string $env This can either be 'staging' or 'live' - * @param boolean $overrideRefWithPrefix Set this parameter to true to use your prefix as the transaction reference - * @return object - * */ - function __construct($secretKey, $prefix = 'RV', $overrideRefWithPrefix = false) - { - $this->secretKey = $secretKey; - $this->publicKey = $_ENV['PUBLIC_KEY']; - $this->env = $_ENV['ENV']; - $this->transactionPrefix = $overrideRefWithPrefix ? $prefix : $prefix . '_'; - $this->overrideTransactionReference = $overrideRefWithPrefix; - // create a log channel - $log = new Logger('flutterwave/rave'); - $this->logger = $log; - $log->pushHandler(new RotatingFileHandler('rave.log', 90, Logger::DEBUG)); - - $this->createReferenceNumber(); - - if ($this->env === 'staging') { - $this->baseUrl = $this->stagingUrl; - } elseif ($this->env === 'live') { - $this->baseUrl = $this->liveUrl; - } else { - $this->baseUrl = $this->stagingUrl; - } - - // set the baseurl - //$this->baseUrl = $this->liveUrl; - - $this->logger->notice('Rave Class Initializes....'); - return $this; - } - - /** - * Generates a checksum value for the information to be sent to the payment gateway - * @return object - * */ - function createCheckSum() - { - $this->logger->notice('Generating Checksum....'); - $options = array( - "public_key" => $this->publicKey, - "amount" => $this->amount, - "tx_ref" => $this->txref, - "currency" => $this->currency, - "payment_options" => "card,mobilemoney,ussd", - "customer" => [ - "email" => $this->customerEmail, - "phone_number" => $this->customerPhone, - "name" => $this->customerFirstname . " " . $this->customerLastname - ], - "redirect_url" => $this->redirectUrl, - "customizations" => [ - "description" => $this->customDescription, - "logo" => $this->customLogo, - "title" => $this->customTitle, - ] - ); - - ksort($options); - - // $this->transactionData = $options; - - // $hashedPayload = ''; - - // foreach($options as $key => $value){ - // $hashedPayload .= $value; - // } - - // echo $hashedPayload; - // $completeHash = $hashedPayload.$this->secretKey; - // $hash = hash('sha256', $completeHash); - - // $this->integrityHash = $hash; - // return $this; - } - - /** - * Generates a transaction reference number for the transactions - * @return object - * */ - function createReferenceNumber() - { - $this->logger->notice('Generating Reference Number....'); - if ($this->overrideTransactionReference) { - $this->txref = $this->transactionPrefix; - } else { - $this->txref = uniqid($this->transactionPrefix); - } - $this->logger->notice('Generated Reference Number....' . $this->txref); - return $this; - } - - /** - * gets the current transaction reference number for the transaction - * @return string - * */ - function getReferenceNumber() - { - return $this->txref; - } - - /** - * Sets the transaction amount - * @param integer $amount Transaction amount - * @return object - * */ - function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Sets the transaction amount - * @param integer $amount Transaction amount - * @return object - * */ - function setAccountNumber($accountno) - { - $this->accountno = $accountno; - return $this; - } - - /** - * Sets the transaction transaction card number - * @param integer $card_no Transaction card number - * @return object - * */ - function setCardNo($card_no) - { - $this->card_no = $card_no; - return $this; - } - - /** - * Sets the transaction transaction CVV - * @param integer $CVV Transaction CVV - * @return object - * */ - function setCVV($cvv) - { - $this->cvv = $cvv; - return $this; - } - - /** - * Sets the transaction transaction expiry_month - * @param integer $expiry_month Transaction expiry_month - * @return object - * */ - function setExpiryMonth($expiry_month) - { - $this->expiry_month = $expiry_month; - return $this; - } - - /** - * Sets the transaction transaction expiry_year - * @param integer $expiry_year Transaction expiry_year - * @return object - * */ - function setExpiryYear($expiry_year) - { - $this->expiry_year = $expiry_year; - return $this; - } - - /** - * Sets the transaction transaction end point - * @param string $end_point Transaction expiry_year - * @return object - * */ - function setEndPoint($end_point) - { - $this->end_point = $end_point; - return $this; - } - - - /** - * Sets the transaction authmodel - * @param string $authmodel - * @return object - * */ - function setAuthModel($authmodel) - { - $this->authModelUsed = $authmodel; - return $this; - } - - - /** - * gets the transaction amount - * @return string - * */ - function getAmount() - { - return $this->amount; - } - - /** - * Sets the allowed payment methods - * @param string $paymentOptions The allowed payment methods. Can be card, account or both - * @return object - * */ - function setPaymentOptions($paymentOptions) - { - $this->paymentOptions = $paymentOptions; - return $this; - } - - /** - * gets the allowed payment methods - * @return string - * */ - function getPaymentOptions() - { - return $this->paymentOptions; - } - - /** - * Sets the transaction description - * @param string $customDescription The description of the transaction - * @return object - * */ - function setDescription($customDescription) - { - $this->customDescription = $customDescription; - return $this; - } - - /** - * gets the transaction description - * @return string - * */ - function getDescription() - { - return $this->customDescription; - } - - /** - * Sets the payment page logo - * @param string $customLogo Your Logo - * @return object - * */ - function setLogo($customLogo) - { - $this->customLogo = $customLogo; - return $this; - } - - /** - * gets the payment page logo - * @return string - * */ - function getLogo() - { - return $this->customLogo; - } - - /** - * Sets the payment page title - * @param string $customTitle A title for the payment. It can be the product name, your business name or anything short and descriptive - * @return object - * */ - function setTitle($customTitle) - { - $this->customTitle = $customTitle; - return $this; - } - - /** - * gets the payment page title - * @return string - * */ - function getTitle() - { - return $this->customTitle; - } - - /** - * Sets transaction country - * @param string $country The transaction country. Can be NG, US, KE, GH and ZA - * @return object - * */ - function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * gets the transaction country - * @return string - * */ - function getCountry() - { - return $this->country; - } - - /** - * Sets the transaction currency - * @param string $currency The transaction currency. Can be NGN, GHS, KES, ZAR, USD, EUR and GBP - * @return object - * */ - function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * gets the transaction currency - * @return string - * */ - function getCurrency() - { - return $this->currency; - } - - /** - * Sets the customer email - * @param string $customerEmail This is the paying customer's email - * @return object - * */ - function setEmail($customerEmail) - { - $this->customerEmail = $customerEmail; - return $this; - } - - /** - * gets the customer email - * @return string - * */ - function getEmail() - { - return $this->customerEmail; - } - - /** - * Sets the customer firstname - * @param string $customerFirstname This is the paying customer's firstname - * @return object - * */ - function setFirstname($customerFirstname) - { - $this->customerFirstname = $customerFirstname; - return $this; - } - - /** - * gets the customer firstname - * @return string - * */ - function getFirstname() - { - return $this->customerFirstname; - } - - /** - * Sets the customer lastname - * @param string $customerLastname This is the paying customer's lastname - * @return object - * */ - function setLastname($customerLastname) - { - $this->customerLastname = $customerLastname; - return $this; - } - - /** - * gets the customer lastname - * @return string - * */ - function getLastname() - { - return $this->customerLastname; - } - - /** - * Sets the customer phonenumber - * @param string $customerPhone This is the paying customer's phonenumber - * @return object - * */ - function setPhoneNumber($customerPhone) - { - $this->customerPhone = $customerPhone; - return $this; - } - - /** - * gets the customer phonenumber - * @return string - * */ - function getPhoneNumber() - { - return $this->customerPhone; - } - - /** - * Sets the payment page button text - * @param string $payButtonText This is the text that should appear on the payment button on the Rave payment gateway. - * @return object - * */ - function setPayButtonText($payButtonText) - { - $this->payButtonText = $payButtonText; - return $this; - } - - /** - * gets payment page button text - * @return string - * */ - function getPayButtonText() - { - return $this->payButtonText; - } - - /** - * Sets the transaction redirect url - * @param string $redirectUrl This is where the Rave payment gateway will redirect to after completing a payment - * @return object - * */ - function setRedirectUrl($redirectUrl) - { - $this->redirectUrl = $redirectUrl; - return $this; - } - - /** - * gets the transaction redirect url - * @return string - * */ - function getRedirectUrl() - { - return $this->redirectUrl; - } - - /** - * Sets the transaction meta data. Can be called multiple time to set multiple meta data - * @param array $meta This are the other information you will like to store with the transaction. It is a key => value array. eg. PNR for airlines, product colour or attributes. Example. array('name' => 'femi') - * @return object - * */ - function setMetaData($meta) - { - array_push($this->meta, $meta); - return $this; - } - - /** - * gets the transaction meta data - * @return string - * */ - function getMetaData() - { - return $this->meta; - } - - /** - * Sets the event hooks for all available triggers - * @param object $handler This is a class that implements the Event Handler Interface - * @return object - * */ - function eventHandler($handler) - { - $this->handler = $handler; - return $this; - } - - /** - * Requerys a previous transaction from the Rave payment gateway - * @param string $referenceNumber This should be the reference number of the transaction you want to requery - * @return object - * */ - function requeryTransaction($referenceNumber) - { - $this->txref = $referenceNumber; - $this->requeryCount++; - $this->logger->notice('Requerying Transaction....' . $this->txref); - if (isset($this->handler)) { - $this->handler->onRequery($this->txref); - } - - $data = array( - 'id' => (int)$referenceNumber - // 'only_successful' => '1' - ); - - // make request to endpoint using unirest. - $headers = array('Content-Type' => 'application/json', 'Authorization' => "Bearer ".$this->secretKey); - $body = Body::json($data); - $url = $this->baseUrl . '/v3/transactions/' . $data['id'] . '/verify'; - // Make `POST` request and handle response with unirest - $response = Request::get($url, $headers); - -// print_r($response); - - //check the status is success - if ($response->body && $response->body->status === "success") { - if ($response->body && $response->body->data && $response->body->data->status === "successful") { - $this->logger->notice('Requeryed a successful transaction....' . json_encode($response->body->data)); - // Handle successful - if (isset($this->handler)) { - $this->handler->onSuccessful($response->body->data); - } - } elseif ($response->body && $response->body->data && $response->body->data->status === "failed") { - // Handle Failure - $this->logger->warn('Requeryed a failed transaction....' . json_encode($response->body->data)); - if (isset($this->handler)) { - $this->handler->onFailure($response->body->data); - } - } else { - // Handled an undecisive transaction. Probably timed out. - $this->logger->warn('Requeryed an undecisive transaction....' . json_encode($response->body->data)); - // I will requery again here. Just incase we have some devs that cannot setup a queue for requery. I don't like this. - if ($this->requeryCount > 4) { - // Now you have to setup a queue by force. We couldn't get a status in 5 requeries. - if (isset($this->handler)) { - $this->handler->onTimeout($this->txref, $response->body); - } - } else { - $this->logger->notice('delaying next requery for 3 seconds'); - sleep(3); - $this->logger->notice('Now retrying requery...'); - $this->requeryTransaction($this->txref); - } - } - } else { - // $this->logger->warn('Requery call returned error for transaction reference.....'.json_encode($response->body).'Transaction Reference: '. $this->txref); - // Handle Requery Error - if (isset($this->handler)) { - $this->handler->onRequeryError($response->body); - } - } - return $this; - } - - /** - * Generates the final json to be used in configuring the payment call to the rave payment gateway - * @return string - * */ - function initialize() - { - - $this->createCheckSum(); - - echo ''; - echo ''; - echo '
Proccessing...
'; - - - echo ''; - - echo ''; - echo ''; - echo ''; - - } - - /** - * this is the getKey function that generates an encryption Key for you by passing your Secret Key as a parameter. - * @param string - * @return string - * */ - - function getKey($seckey) - { - $hashedkey = md5($seckey); - $hashedkeylast12 = substr($hashedkey, -12); - - $seckeyadjusted = str_replace("FLWSECK-", "", $seckey); - $seckeyadjustedfirst12 = substr($seckeyadjusted, 0, 12); - - $encryptionkey = $seckeyadjustedfirst12 . $hashedkeylast12; - return $encryptionkey; - - } - - /** - * this is the encrypt3Des function that generates an encryption Key for you by passing your transaction Data and Secret Key as a parameter. - * @param string - * @return string - * */ - - function encrypt3Des($data, $key) - { - $encData = openssl_encrypt($data, 'DES-EDE3', $key, OPENSSL_RAW_DATA); - return base64_encode($encData); - } - - /** - * this is the encryption function that combines the getkey() and encryptDes(). - * @param string - * @return string - * */ - - function encryption($options) - { - //encrypt and return the key using the secrekKey - $this->key = $_ENV['ENCRYPTION_KEY']; - //set the data to transactionData - $this->transactionData = $options; - //encode the data and the - return $this->encrypt3Des($this->transactionData, $this->key); - } - - /** - * makes a post call to the api - * @param array - * @return object - * */ - - function postURL($data) - { - // make request to endpoint using unirest - - $bearerTkn = 'Bearer ' . $this->secretKey; - $headers = array('Content-Type' => 'application/json', 'Authorization' => $bearerTkn); - $body = Body::json($data); - $url = $this->baseUrl . '/' . $this->end_point; - $response = Request::post($url, $headers, $body); - return $response->raw_body; // Unparsed body - } - - - function putURL($data) - { - $bearerTkn = 'Bearer ' . $this->secretKey; - $headers = array('Content-Type' => 'application/json', 'Authorization' => $bearerTkn); - $body = Body::json($data); - $url = $this->baseUrl . '/' . $this->end_point; - $response = Request::put($url, $headers, $body); - return $response->raw_body; - } - - function delURL($url) - { - $bearerTkn = 'Bearer ' . $this->secretKey; - $headers = array('Content-Type' => 'application/json', 'Authorization' => $bearerTkn); - //$body = Body::json($data); - $path = $this->baseUrl . '/' . $this->end_point; - $response = Request::delete($path . $url, $headers); - return $response->raw_body; - } - - - /** - * makes a get call to the api - * @param array - * @return object - * */ - - function getURL($url) - { - // make request to endpoint using unirest. - $bearerTkn = 'Bearer ' . $this->secretKey; - $headers = array('Content-Type' => 'application/json', 'Authorization' => $bearerTkn); - //$body = Body::json($data); - $path = $this->baseUrl . '/' . $this->end_point; - $response = Request::get($path . $url, $headers); - return $response->raw_body; // Unparsed body - } - - /** - * verify the transaction before giving value to your customers - * @param string - * @return object - * */ - function verifyTransaction($id) - { - - $url = "/" . $id . "/verify"; - $this->logger->notice('Verifying transaction...'); - $this->setEndPoint("v3/transactions"); - $result = $this->getURL($url); - $result = json_decode($result, true); - return $result; - - } - - /** - * Validate the transaction to be charged - * @param string - * @return object - * */ - function validateTransaction($otp, $ref, $type) - { - - - $this->logger->notice('Validating otp...'); - $this->setEndPoint("v3/validate-charge"); - $this->post_data = array( - 'type' => $type,//type can be card or account - 'flw_ref' => $ref, - 'otp' => $otp, - ); - $result = $this->postURL($this->post_data); - return $result; - - } - - function validateTransaction2($pin, $Ref) - { - - $this->logger->notice('Validating pin...'); - $this->setEndPoint("v3/validate-charge"); - $this->post_data = array( - 'PBFPubKey' => $this->publicKey, - 'transactionreference' => $Ref, - 'otp' => $otp); - $result = $this->postURL($this->post_data); - return $result; - - - } - - - /** - * Get all Transactions - * @return object - * */ - - - - function getAllTransactions() - { - $this->logger->notice('Getting all Transactions...'); - $url = ""; - $result = $this->getURL($url); - return json_decode($result, true); - - } - - function getTransactionFee() - { - $url = ""; - $result = $this->getURL($url); - return json_decode($result, true); - - } - - function transactionTimeline() - { - $url = ""; - $result = $this->getURL($url); - return json_decode($result, true); - - } - - - /** - * Get all Settlements - * @return object - * */ - - function getAllSettlements() - { - - $this->logger->notice('Getting all Subscription...'); - $url = ""; - $result = $this->getURL($url); - return json_decode($result, true); - } - - /** - * Validating your bvn - * @param string - * @return object - * */ - - function bvn($bvn) - { - $this->logger->notice('Validating bvn...'); - $url = "/" . $bvn; - return json_decode($this->getURL($url), true); - } - - /** - * Get all Subscription - * @return object - * */ - - function getAllSubscription() - { - $this->logger->notice('Getting all Subscription...'); - $url = ''; - return json_decode($this->getURL($url), true); - } - - /** - * Get a Subscription - * @param $id ,$email - * @return object - * */ - - function cancelSubscription() - { - $this->logger->notice('Canceling Subscription...'); - $data = array(); - $result = $this->putURL($data); - return json_decode($result, true); - } - - /** - * Get a Settlement - * @param $id ,$email - * @return object - * */ - - function fetchASettlement() - { - $this->logger->notice('Fetching a Subscription...'); - $url = "?seckey=" . $this->secretKey; - return $this->getURL($url); - } - - /** - * activating a subscription - * @return object - * */ - - function activateSubscription() - { - $this->logger->notice('Activating Subscription...'); - $data = array(); - return $this->putURL($data); - } - - /** - * Creating a payment plan - * @param array - * @return object - * */ - - function createPlan($array) - { - $this->logger->notice('Creating Payment Plan...'); - $result = $this->postURL($array); - $result = json_decode($result, true); - return $result; - } - - - function updatePlan($array) - { - $this->logger->notice('Updating Payment Plan...'); - - $result = $this->putURL($array); - $result = json_decode($result, true); - return $result; - } - - function cancelPlan($array) - { - $this->logger->notice('Canceling Payment Plan...'); - - $result = $this->putURL($array); - $result = json_decode($result, true); - return $result; - } - - function getPlans() - { - $url = ""; - $result = $this->getURL($url); - $result = json_decode($result, true); - return $result; - } - - function get_a_Plan() - { - $url = ""; - $result = $this->getURL($url); - $result = json_decode($result, true); - return $result; - } - - /** - * Creating a beneficiary - * @param array - * @return object - * */ - - function createBeneficiary($array) - { - $this->logger->notice('Creating beneficiaries ...'); - $result = $this->postURL($array); - $result = json_decode($result, true); - return $result; - } - - /** - * get beneficiaries - * @param array - * @return object - * */ - - - function getBeneficiaries() - { - $url = ""; - $result = $this->getURL($url); - $result = json_decode($result, true); - return $result; - } - - /** - * transfer payment api - * @param array - * @return object - * */ - - function transferSingle($array) - { - $this->logger->notice('Processing transfer...'); - $result = $this->postURL($array); - $result = json_decode($result, true); - return $result; - - } - - - function deleteBeneficiary() - { - $url = ""; - $result = $this->delURL($url); - $result = json_decode($result, true); - return $result; - } - - - /** - * bulk transfer payment api - * @param array - * @return object - * */ - - function transferBulk($array) - { - $this->logger->notice('Processing bulk transfer...'); - $result = $this->postURL($array); - $result = json_decode($result, true); - return $result; - - } - - /** - * Refund payment api - * @param array - * @return object - * */ - - function refund($array) - { - $this->logger->notice('Initiating a refund...'); - $result = $this->postURL($array); - $result = json_decode($result, true); - return $result; - - } - - - /** - * Generates the final json to be used in configuring the payment call to the rave payment gateway api - * @param array - * @return object - * */ - - function chargePayment($array) - { - - //remove the type param from the payload - - $this->options = $array; - - - if ($this->type === 'card') { - $this->json_options = json_encode($this->options); - $this->logger->notice('Checking payment details..'); - //encrypt the required options to pass to the server - $this->integrityHash = $this->encryption($this->json_options); - $this->post_data = array( - 'client' => $this->integrityHash - ); - - $result = $this->postURL($this->post_data); - // the result returned requires validation - $result = json_decode($result, true); - // echo '
';
-            // print_r($result);
-            // echo '
'; - - if ($result['status'] == 'success') { - if ($result['meta']['authorization']['mode'] == 'pin' || $result['meta']['authorization']['mode'] == 'avs_noauth' - || $result['meta']['authorization']['mode'] == 'redirect' || $result['meta']['authorization']['mode'] == 'otp') { - $this->logger->notice('Payment requires otp validation...authmodel:' . $result['meta']['authorization']['mode']); - $this->authModelUsed = $result['meta']['authorization']['mode']; - - - if ($this->authModelUsed == 'redirect') { - header('Location:' . $result['meta']['authorization']['redirect']); - } - - if ($this->authModelUsed == 'pin' || $this->authModelUsed == 'avs_noauth') { - return $result; - } - - if ($this->authModelUsed == 'otp') { - $this->flwRef = $result['data']['flw_ref']; - return ['data' => ["flw_ref" => $this->flwRef, "id" => $result['data']['id'], "auth_mode" => $result['meta']['authorization']['mode']]]; - } - - - } - - } else { - - return '
' . $result['message'] . '
'; - - } - - //passes the result to the suggestedAuth function which re-initiates the charge - - - } else if ($this->type == "momo") { - $result = $this->postURL($array); - $result = json_decode($result, true); - - // print_r($result['meta']); - //echo "momo payment"; - if (isset($result['meta']['authorization'])) { - header('Location:' . $result['meta']['authorization']['redirect']); - } - - } else { - $result = $this->postURL($array); - // the result returned requires validation - $result = json_decode($result, true); - - if (isset($result['meta']['redirect'])) { - header('Location:' . $result['meta']['redirect']); - } - - if (isset($result['data']['status'])) { - $this->logger->notice('Payment requires otp validation...'); - $this->authModelUsed = $result['data']['auth_model']; - $this->flwRef = $result['data']['flw_ref']; - $this->txref = $result['data']['tx_ref']; - } - - - return $result; - } - - - } - - /** - * sends a post request to the virtual APi set by the user - * @param array - * @return object - * */ - - function vcPostRequest($array) - { - $this->post_data = $array; - //post the data to the API - $result = $this->postURL($this->post_data); - //decode the response - $result = json_decode($result, true); - //return result - return $result; - // return $result; - } - - function vcGetRequest() - { - $url = ""; - $result = $this->getURL($url); - $result = json_decode($result, true); - return $result; - } - - - function vcPutRequest($array = array()) - { - $result = $this->putURL($array); - $result = json_decode($result, true); - return $result; - } - - /** - * Used to create sub account on the rave dashboard - * @param array - * @return object - * */ - function createSubaccount($array) - { - $this->options = $array; - $this->logger->notice('Creating Sub account...'); - //pass $this->options to the postURL function to call the api - $result = $this->postURL($this->options); - $result = json_decode($result, true); - return $result; - } - - function getSubaccounts() - { - $url = ""; - //pass $this->options to the postURL function to call the api - $result = $this->getURL($url); - $result = json_decode($result, true); - return $result; - } - - function fetchSubaccount() - { - $url = ""; - //pass $this->options to the postURL function to call the api - $result = $this->getURL($url); - $result = json_decode($result, true); - return $result; - } - - function updateSubaccount($array) - { - $this->options = $array; - $this->logger->notice('updating Sub account...'); - //pass $this->options to the postURL function to call the api - $result = $this->putURL($this->options); - $result = json_decode($result, true); - return $result; - } - - function deleteSubaccount($array = array()) - { - $this->logger->notice('deleting Sub account...'); - //pass $this->options to the postURL function to call the api - $result = $this->putURL($array); - $result = json_decode($result, true); - return $result; - } - - /** - * Handle canceled payments with this method - * @param string $referenceNumber This should be the reference number of the transaction that was canceled - * @return object - * */ - function paymentCanceled($referenceNumber) - { - - $this->logger->notice('Payment was canceled by user..' . $this->txref); - if (isset($this->handler)) { - $this->handler->onCancel($referenceNumber); - } - return $this; - } - - /** - * This is used to create virtual account for a merchant. - * @param string $array - * @return object - */ - function createVirtualAccount($array) - { - $this->options = $array; - $this->logger->notice('creating virtual account..'); - $result = $this->postURL($this->options); - return $result; - } - - /** - * Create bulk virtual accounts with this method - * @param string $array - * @return object - * */ - - function createBulkAccounts($array) - { - $this->options = $array; - $this->logger->notice('creating bulk virtual account..'); - $result = $this->postURL($this->options); - return $result; - } - - - /** - * Get bulk virtual virtual cards method - * @return object - * */ - - function getBulkAccounts() - { - $url = ""; - $result = $this->getURL($url); - return json_decode($result, true); - } - - /** - * Create an Order with this method - * @param string $array - * @return object - * */ - - function createOrder($array) - { - $this->logger->notice('creating Ebill order for customer with email: ' . $array['email']); - - if (empty($array['narration']) || !array_key_exists('narration', $array)) { - $array['narration'] = ''; - - } - if (empty($data['IP'])) { - $array['IP'] = '10.30.205.3'; - - } - if (!isset($array['custom_business_name']) || empty($array['custom_business_name'])) { - $array['custom_business_name'] = ''; - } - - if (empty($array['number_of_units']) || !array_key_exists('number_of_units', $array)) { - $array['number_of_units'] = "1"; - } - - $data = array( - 'narration' => $array['narration'], - 'number_of_units' => $array['number_of_units'], - 'currency' => $array['currency'], - 'amount' => $array['amount'], - 'phone_number' => $array['phone_number'], - 'email' => $array['email'], - 'tx_ref' => $array['tx_ref'], - 'ip' => $array['ip'], - 'country' => $array['country'], - 'custom_business_name' => $array['custom_business_name'] - ); - $result = $this->postURL($data); - $result = json_decode($result, true); - return $result; - } - - /** - * Update an Order with this method - * @param string $array - * @return object - * */ - function updateOrder($array) - { - $this->logger->notice('updating Ebill order..'); - - $data = array( - 'amount' => $array['amount'], - 'currency' => "NGN"// only NGN can be passed - ); - - - $result = $this->putURL($data); - $result = json_decode($result, true); - return $result; - } - - /** - * pay bill or query bill information with this method - * @param string $array - * @return object - * */ - - function bill($array) - { - - if (!isset($array['type'])) { - $error = array('Type' => 'Missing the type property in the payload'); - return $error; - } - - $this->logger->notice($array['type'] . ' Billing ...'); - - $data = array(); - $data["type"] = $array["type"]; - $data["country"] = $array["country"]; - $data["customer"] = $array["customer"]; - $data["amount"] = $array["amount"]; - $data["recurrence"] = $array["recurrence"]; - $data["reference"] = $array["reference"]; - $result = $this->postUrl($data); - - - $result = json_decode($result, true); - - - return $result; - } - - function bulkBills($array) - { - $data = $array; - - $result = $this->postUrl($data); - - $result = json_decode($result, true); - - return $result; - } - - function getBill($array) - { - - if (array_key_exists('reference', $array) && !array_key_exists('from', $array)) { - $url = "/" . $array['reference']; - } else if (array_key_exists('code', $array) && !array_key_exists('customer', $array)) { - - $url = "/" . $array['item_code']; - } else if (array_key_exists('id', $array) && array_key_exists('product_id', $array)) { - $url = "/" . $array['id'] . "/products/" . $array['product_id']; - } else if (array_key_exists('from', $array) && array_key_exists('to', $array)) { - if (isset($array['page']) && isset($array['reference'])) { - $url = '?from=' . $array['from'] . '&' . $array['to'] . '&' . $array['page'] . '&' . $array['reference']; - } else { - $url = '?from=' . $array['from'] . '&' . $array['to']; - - } - - - } - - return $this->getURL($url); - } - - function getBillers() - { - $url = '/billers'; - return $this->getURL($url); - } - - function getBillCategories() - { - $url = '/bill-categories'; - return $this->getURL($url); - - } - - - function tokenCharge($array) - { - $data = $array; - - if (!isset($data['token']) && !isset($data['currency']) && - !isset($data['country']) && !isset($data['amount']) && - !isset($data['tx_ref']) && !isset($data['email'])) { - $error = array('error' => 'Your payload is missing all properties'); - return $error; - } - - $result = $this->postUrl($array); - - $result = json_decode($result, true); - - return $result; - - } - - /** - * List of all transfers with this method - * @param string $data - * @return object - * */ - - function listTransfers($data) - { - $this->logger->notice('Fetching list of transfers...'); - - if (isset($data['page'])) { - $url = "?page=" . $data['page']; - return json_decode($this->getURL($url), true); - - } else if (isset($data['page']) && isset($data['status'])) { - $url = "?page" . $data['page'] . "&status" . $data['status']; - return json_decode($this->getURL($url), true); - - } else if (isset($data['status'])) { - $url = "?status=" . $data['status']; - return json_decode($this->getURL($url), true); - - } else { - - $url = ""; - return json_decode($this->getURL($url), true); - } - - } - - /** - * Check a bulk transfer status with this method - * @param string $data - * @return object - * */ - - function bulkTransferStatus($data) - { - - $this->logger->notice('Checking bulk transfer status...'); - $url = "?batch_id=" . $data['batch_id']; - return $this->getURL($url); - } - - /** - * Check applicable fees with this method - * @param string $data - * @return object - * */ - - function applicableFees($data) - { - - $this->logger->notice('Fetching applicable fees...'); - $url = "?currency=" . $data['currency'] . "&amount=" . $data['amount']; - return $this->getURL($url); - } - - /** - * Retrieve Transfer balance with this method - * @param string $array - * @return object - * */ - - function getTransferBalance($array) - { - $this->logger->notice('Fetching Transfer Balance...'); - if (empty($array['currency'])) { - $array['currency'] == 'NGN'; - } - $data = array( - "currency" => $array['currency'] - ); - return $this->postURL($data); - } - - /** - * Verify an Account to Transfer to with this method - * @param string $array - * @return object - * */ - - function verifyAccount($array) - { - - $this->logger->notice('Verifying transfer recipents account...'); - $data = array( - "account_number" => $array['account_number'], - "account_bank" => $array['account_bank'] - ); - return $this->postURL($data); - - } - - /** - * Lists banks for Transfer with this method - * @return object - * */ - - function getBanksForTransfer() - { - $this->logger->notice('Fetching banks available for Transfer...'); - - //get banks for transfer - $url = ""; - $result = $this->getURL($url); - - } - - /** - * Captures funds this method - * @param string $array - * @return object - * */ - - function captureFunds($array) - { - $this->logger->notice('capturing funds for flw_ref: ' . $array['flw_ref'] . ' ...'); - unset($array['flw_ref']); - $data = array( - "amount" => $array['amount'] - ); - return $this->postURL($data); - - } - - function getvAccountsNum() - { - $url = ""; - $result = $this->getURL($url); - $result = json_decode($result, true); - return $result; - } - - /** - * Void a Preauthorized fund with this method - * @param string $array - * @return object - * */ - - function void($array) - { - $this->logger->notice('voided a captured fund with the flw_ref=' . $array['flw_ref']); - unset($array['flw_ref']); - $data = array(); - return $this->postURL($data); - } - - /** - * Refund a Preauthorized fund with this method - * @param string $array - * @return object - * */ - - function preRefund($array) - { - $this->logger->notice('refunding a captured fund with the flw_ref=' . $array['flw_ref']); - unset($array['flw_ref']); - $data = array( - "amount" => $array['amount'] - ); - return $this->postURL($data); - } - - -} - -// silencio es dorado -?> - diff --git a/library/Recipient.php b/library/Recipient.php deleted file mode 100644 index 98d29db..0000000 --- a/library/Recipient.php +++ /dev/null @@ -1,104 +0,0 @@ -recipient = new Rave($_ENV['SECRET_KEY']); - } - - function createRecipient($array) - { - //set the payment handler - - if (!isset($array['account_number']) || !isset($array['account_bank'])) { - return ''; - } - $this->recipient->eventHandler(new RecipientEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/beneficiaries"); - //returns the value from the results - - RecipientEventHandler::startRecording(); - $response = $this->recipient->createBeneficiary($array); - RecipientEventHandler::sendAnalytics('Create-Recipient'); - - return $response; - } - - function listRecipients() - { - $this->recipient->eventHandler(new RecipientEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/beneficiaries"); - //returns the value from the results - RecipientEventHandler::startRecording(); - $response = $this->recipient->getBeneficiaries(); - RecipientEventHandler::sendAnalytics('List-Recipients'); - - return $response; - } - - function fetchBeneficiary($array) - { - if (!isset($array['id'])) { - return ''; - } - - if (gettype($array['id']) !== 'string') { - $array['id'] = (string)$array['id']; - } - - $this->recipient->eventHandler(new RecipientEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/beneficiaries/" . $array['id']); - //returns the value from the results - RecipientEventHandler::startRecording(); - $response = $this->recipient->getBeneficiaries(); - RecipientEventHandler::sendAnalytics('Fetch-Beneficiary'); - - return $response; - } - - function deleteBeneficiary($array) - { - - if (!isset($array['id'])) { - return ''; - } - - if (gettype($array['id']) !== 'string') { - $array['id'] = (string)$array['id']; - } - - $this->recipient->eventHandler(new RecipientEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/beneficiaries/" . $array['id']); - //returns the value from the results - - RecipientEventHandler::startRecording(); - $response= $this->recipient->deleteBeneficiary(); - RecipientEventHandler::sendAnalytics('Delete-Beneficiary'); - - return $response; - } - -} - -?> diff --git a/library/Settlement.php b/library/Settlement.php deleted file mode 100644 index 57b5bb0..0000000 --- a/library/Settlement.php +++ /dev/null @@ -1,44 +0,0 @@ -settle = new Rave($_ENV['PUBLIC_KEY'], $_ENV['SECRET_KEY'], $_ENV['ENV']); - } - - function fetchSettlement($array) { - //set the payment handler - $this->subscription->eventHandler(new SettlementEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/settlements/" . $array['id']); - //returns the value from the results - - SettlementEventHandler::startRecording(); - $response = $this->settle->fetchASettlement(); - SettlementEventHandler::sendAnalytics('Fetch-Settlement'); - - return $response; - - } - - function listAllSettlements() { - //set the payment handler - $this->settle->eventHandler(new SettlementEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/settlements"); - //returns the value from the results - - SettlementEventHandler::startRecording(); - $response = $this->settle->getAllSettlements(); - SettlementEventHandler::sendAnalytics('List-All-Settlements'); - - return $response; - - } - -} diff --git a/library/Subaccount.php b/library/Subaccount.php deleted file mode 100644 index 135e2dd..0000000 --- a/library/Subaccount.php +++ /dev/null @@ -1,95 +0,0 @@ -subaccount = new Rave($_ENV['SECRET_KEY']); - } - - function createSubaccount($array) - { - //set the payment handler - $this->subaccount->eventHandler(new SubaccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/subaccounts"); - //returns the value from the results - SubaccountEventHandler::startRecording(); - $response = $this->subaccount->createSubaccount($array); - SubaccountEventHandler::sendAnalytics('Create-Subaccount'); - - return $response; - } - - function getSubaccounts() - { - - $this->subaccount->eventHandler(new SubaccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/subaccounts"); - //returns the value from the results - SubaccountEventHandler::startRecording(); - $response = $this->subaccount->getSubaccounts(); - SubaccountEventHandler::sendAnalytics('Get-Subaccounts'); - - return $response; - } - - function fetchSubaccount($array) - { - - $this->subaccount->eventHandler(new SubaccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/subaccounts/" . $array['id']); - //returns the value from the results - SubaccountEventHandler::startRecording(); - $response = $this->subaccount->fetchSubaccount(); - SubaccountEventHandler::sendAnalytics('Fetch-Subaccount'); - - return $response; - - } - - function updateSubaccount($array) - { - - if (!isset($array['id'])) { - return ''; - } - - $this->subaccount->eventHandler(new SubaccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/subaccounts/" . $array['id']); - //returns the value from the results - SubaccountEventHandler::startRecording(); - $response = $this->subaccount->updateSubaccount($array); - SubaccountEventHandler::sendAnalytics('Update-Subaccount'); - - return $response; - - } - - function deleteSubaccount($array) - { - $this->subaccount->eventHandler(new SubaccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/subaccounts/" . $array['id']); - //returns the value from the results - - SubaccountEventHandler::startRecording(); - $response = $this->subaccount->deleteSubaccount(); - SubaccountEventHandler::sendAnalytics('Delete-Subaccount'); - - return $response; - } -} diff --git a/library/Subscription.php b/library/Subscription.php deleted file mode 100644 index 9d2a5fb..0000000 --- a/library/Subscription.php +++ /dev/null @@ -1,65 +0,0 @@ -subscription = new Rave($_ENV['SECRET_KEY']); - } - - function activateSubscription($id) - { - //set the payment handler - $endPoint = 'v3/subscriptions/' . $id . '/activate'; - $this->subscription->eventHandler(new SubscriptionEventHandler) - //set the endpoint for the api call - ->setEndPoint($endPoint); - //returns the value from the results - SubscriptionEventHandler::startRecording(); - $response = $this->subscription->activateSubscription(); - SubscriptionEventHandler::sendAnalytics('Activate-Subscriptions'); - - return $response; - } - - function getAllSubscription() - { - //set the payment handler - $this->subscription->eventHandler(new SubscriptionEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/subscriptions"); - //returns the value from the results - SubscriptionEventHandler::startRecording(); - $response = $this->subscription->getAllSubscription(); - SubscriptionEventHandler::sendAnalytics('Get-All-Subscriptions'); - - return $response; - } - - function cancelSubscription($id) - { - $endPoint = 'v3/subscriptions/' . $id . '/cancel'; - //set the payment handler - - $this->subscription->eventHandler(new SubscriptionEventHandler) - //set the endpoint for the api call - ->setEndPoint($endPoint); - //returns the value from the results - SubscriptionEventHandler::startRecording(); - $response= $this->subscription->cancelSubscription(); - SubscriptionEventHandler::sendAnalytics('Cancel-Subscription'); - - return $response; - } -} - diff --git a/library/TokenizedCharge.php b/library/TokenizedCharge.php deleted file mode 100644 index 1b4383b..0000000 --- a/library/TokenizedCharge.php +++ /dev/null @@ -1,109 +0,0 @@ -payment = new Rave($_ENV['SECRET_KEY']); - } - - function tokenCharge($array) - { - - //add tx_ref to the paylaod - if (empty($array['tx_ref'])) { - $array['tx_ref'] = $this->payment->txref; - } - - if (gettype($array['amount']) !== "integer") { - return ''; - } - - if (!isset($array['token']) || !isset($array['currency']) || !isset($array['country']) || - !isset($array['amount']) || !isset($array['email'])) { - return ''; - } - //set the payment handler - $this->payment->eventHandler(new TkEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/tokenized-charges"); - //returns the value from the results - //you can choose to store the returned value in a variable and validate within this function - TkEventHandler::startRecording(); - $response = $this->payment->tokenCharge($array); - TkEventHandler::sendAnalytics('Initiate-Token-charge'); - - return $response; - } - - - function updateEmailTiedToToken($data) - { - - //set the payment handler - $this->payment->eventHandler(new TkEventHandler) - //set the endpoint for the api call - ->setEndPoint("v2/gpx/tokens/embed_token/update_customer"); - //returns the value from the results - //you can choose to store the returned value in a variable and validate within this function - TkEventHandler::startRecording(); - $response = $this->payment->postURL($data); - TkEventHandler::sendAnalytics('Update-Email-tied-to-Token'); - - return $response; - - } - - function bulkCharge($data) - { - //https://api.ravepay.co/flwv3-pug/getpaidx/api/tokenized/charge_bulk - //set the payment handler - $this->payment->eventHandler(new TkEventHandler) - //set the endpoint for the api call - ->setEndPoint("flwv3-pug/getpaidx/api/tokenized/charge_bulk"); - - TkEventHandler::startRecording(); - $response = $this->payment->bulkCharges($data); - TkEventHandler::sendAnalytics('Initiate-Tokenized-Bulk-charge'); - - return $response; - - } - - function bulkChargeStatus($data) - { - //https://api.ravepay.co/flwv3-pug/getpaidx/api/tokenized/charge_bulk - //set the payment handler - $this->payment->eventHandler(new TkEventHandler) - //set the endpoint for the api call - ->setEndPoint("flwv3-pug/getpaidx/api/tokenized/charge_bulk"); - -// tkEventHandler::startRecording(); - $response = $this->payment->bulkCharges($data); -// tkEventHandler::sendAnalytics('Get-Tokenized-Bulk-charge-status'); - - return $response; - } - - function verifyTransaction() - { - //verify the charge - return $this->payment->verifyTransaction($this->payment->txref);//Uncomment this line if you need it - } - - -} - diff --git a/library/TransactionVerification.php b/library/TransactionVerification.php deleted file mode 100644 index d43f6f5..0000000 --- a/library/TransactionVerification.php +++ /dev/null @@ -1,33 +0,0 @@ -validate = new Rave($_ENV['SECRET_KEY']); - } - - function transactionVerify($id) - { - //set the payment handler - $this->validate->eventHandler(new TransactionVerificationEventHandler); - //returns the value from the results - TransactionVerificationEventHandler::startRecording(); - $response = $this->validate->verifyTransaction($id); - TransactionVerificationEventHandler::sendAnalytics('Verify-Transaction'); - - return $response; - } -} - -?> diff --git a/library/Transactions.php b/library/Transactions.php deleted file mode 100644 index ba0ceec..0000000 --- a/library/Transactions.php +++ /dev/null @@ -1,80 +0,0 @@ -history = new Rave($_ENV['SECRET_KEY']); - } - function viewTransactions(){ - //set the payment handler - $this->history->eventHandler(new TransactionVerificationEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/transactions"); - //returns the value from the results - TransactionVerificationEventHandler::startRecording(); - $response = $this->history->getAllTransactions(); - TransactionVerificationEventHandler::sendAnalytics("Get-All-Transactions"); - - return $response; - } - - function getTransactionFee($array = array()){ - - if(!isset($array['amount'])){ - return ''; - } - - - $this->history->eventHandler(new TransactionVerificationEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/transactions/fee"); - //returns the value from the results - - TransactionVerificationEventHandler::startRecording(); - $response = $this->history->getTransactionFee($array); - TransactionVerificationEventHandler::sendAnalytics("Get-Transaction-Fee"); - - return $response; - } - - function verifyTransaction($id){ - - $this->history->eventHandler(new TransactionVerificationEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/transactions/".$id."/verify"); - //returns the value from the results - - TransactionVerificationEventHandler::startRecording(); - $response = $this->history->verifyTransaction($id); - TransactionVerificationEventHandler::sendAnalytics("Verify-Transaction"); - - return $response; - } - - - function viewTimeline($array = array()){ - if(!isset($array['id'])){ - return ''; - } - - $this->history->eventHandler(new TransactionVerificationEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/transactions/".$array['id']."/events"); - //returns the value from the results - - TransactionVerificationEventHandler::startRecording(); - $response = $this->history->transactionTimeline(); - TransactionVerificationEventHandler::sendAnalytics("View-Transaction-Timeline"); - - return $response; - } -} diff --git a/library/Transfer.php b/library/Transfer.php deleted file mode 100644 index 553f004..0000000 --- a/library/Transfer.php +++ /dev/null @@ -1,126 +0,0 @@ -transfer = new Rave($_ENV['SECRET_KEY']); - } - - //initiating a single transfer - function singleTransfer($array) - { - //set the payment handler - $this->transfer->eventHandler(new TransferEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/transfers"); - //returns the value from the results - TransferEventHandler::startRecording(); - $response = $this->transfer->transferSingle($array); - TransferEventHandler::sendAnalytics('Initiate-Single-Transfer'); - - return $response; - } - - //initiating a bulk transfer - function bulkTransfer($array) - { - //set the payment handler - $this->transfer->eventHandler(new TransferEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/bulk-transfers"); - //returns the value from the results - TransferEventHandler::startRecording(); - $response = $this->transfer->transferBulk($array); - TransferEventHandler::sendAnalytics('Initiate-Bulk-Transfer'); - - return $response; - } - - function listTransfers($array = array('url' => 'blank')) - { - $this->transfer->eventHandler(new TransferEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/transfers"); - - TransferEventHandler::startRecording(); - $response = $this->transfer->listTransfers($array); - TransferEventHandler::sendAnalytics('List-Transfer'); - - return $response; - - - //set the payment handler - - } - - function bulkTransferStatus($array) - { - - //set the payment handler - $this->transfer->eventHandler(new TransferEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/bulk-transfers"); - - TransferEventHandler::startRecording(); - $response = $this->transfer->bulkTransferStatus($array); - TransferEventHandler::sendAnalytics('Bulk-Transfer-Status'); - - return $response; - } - - function getTransferFee($array) - { - - if (in_array('amount', $array) && gettype($array['amount']) !== "string") { - $array['amount'] = (string)$array['amount']; - } - - //set the payment handler - $this->transfer->eventHandler(new TransferEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/transfers/fee"); - - TransferEventHandler::startRecording(); - $response = $this->transfer->applicableFees($array); - TransferEventHandler::sendAnalytics('Get-Transfer-Fee'); - - return $response; - } - - - function getBanksForTransfer($data = array("country" => 'NG')) - { - - //set the payment handler - $this->transfer->eventHandler(new TransferEventHandler) - //set the endpoint for the api call - - ->setEndPoint("v2/banks/" . $data['country'] . "/"); - - TransferEventHandler::startRecording(); - $response= $this->transfer->getBanksForTransfer(); - TransferEventHandler::sendAnalytics('Get-Banks-For-Transfer'); - - return $response; - } - - - function verifyTransaction() - { - //verify the charge - return $this->transfer->verifyTransaction($this->transfer->txref);//Uncomment this line if you need it - } - - -} - diff --git a/library/Ussd.php b/library/Ussd.php deleted file mode 100644 index 13d2eb2..0000000 --- a/library/Ussd.php +++ /dev/null @@ -1,49 +0,0 @@ -payment = new Rave($_ENV['SECRET_KEY']); - $this->type = "ussd"; - } - - function ussd($array) - { - - $this->payment->type = 'ussd'; - - //add tx_ref to the paylaod - if (empty($array['tx_ref'])) { - $array['tx_ref'] = $this->payment->txref; - } - - - //set the payment handler - $this->payment->eventHandler(new UssdEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges?type=" . $this->payment->type); - //returns the value from the results - UssdEventHandler::startRecording(); - $response= $this->payment->chargePayment($array); - UssdEventHandler::sendAnalytics('Initiate-USSD-Transfer'); - - return $response; - - } - - function verifyTransaction($id) - { - //verify the charge - return $this->payment->verifyTransaction($id);//Uncomment this line if you need it - } - -} diff --git a/library/VirtualAccount.php b/library/VirtualAccount.php deleted file mode 100644 index 4e59fed..0000000 --- a/library/VirtualAccount.php +++ /dev/null @@ -1,103 +0,0 @@ -va = new Rave($_ENV['SECRET_KEY']); - } - - /** - * Creating the VirtualAccount - */ - - function createvirtualAccount($userdata) { - - if (!isset($userdata['email']) || !isset($userdata['duration']) || !isset($userdata['frequency']) - || !isset($userdata['amount'])) { - return ''; - } - - - $this->va->eventHandler(new VirtualAccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/virtual-account-numbers"); - - //returns the value of the result. - UssdEventHandler::startRecording(); - $response = $this->va->createVirtualAccount($userdata); - UssdEventHandler::sendAnalytics('Create-Virtual-Account'); - - return $response; - - - } - - function createBulkAccounts($array) { - - $this->va->eventHandler(new VirtualAccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/bulk-virtual-account-numbers"); - - //returns the value of the result. - UssdEventHandler::startRecording(); - $response = $this->va->createBulkAccounts($array); - UssdEventHandler::sendAnalytics('Create-Bulk-Virtual-Account'); - - return $response; - } - - function getBulkAccounts($array) { - if (!isset($array['batch_id'])) { - return ''; - } - - $this->va->eventHandler(new VirtualAccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/bulk-virtual-account-numbers/" . $array['batch_id']); - - //returns the value of the result. - UssdEventHandler::startRecording(); - $response = $this->va->getBulkAccounts($array); - UssdEventHandler::sendAnalytics('Get-Bulk-Virtual-Account'); - - return $response; - - } - - function getAccountNumber($array) { - - if (!isset($array['order_ref'])) { - return ''; - } - - $this->va->eventHandler(new VirtualAccountEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/virtual-account-numbers/" . $array['order_ref']); - - //returns the value of the result. - UssdEventHandler::startRecording(); - $response = $this->va->getvAccountsNum(); - UssdEventHandler::sendAnalytics('Get-Virtual-Account-number'); - - return $response; - } - - -} - - - - diff --git a/library/VirtualCard.php b/library/VirtualCard.php deleted file mode 100644 index d018f0b..0000000 --- a/library/VirtualCard.php +++ /dev/null @@ -1,174 +0,0 @@ -vc = new Rave($_ENV['SECRET_KEY']); - } - - //create card function - function createCard($array) - { - //set the endpoint for the api call - if (!isset($array['currency']) || !isset($array['amount']) || !isset($array['billing_name'])) { - return ''; - } else { - $this->vc->setEndPoint("v3/virtual-cards"); - - self::startRecording(); - $response = $this->vc->vcPostRequest($array); - self::sendAnalytics('Create-Virtual-Card'); - - return $response; - } - - - } - - //get the detials of a card using the card id - function getCard($array) - { - - if (!isset($array['id'])) { - return ''; - } else { - //set the endpoint for the api call - $this->vc->setEndPoint("v3/virtual-cards/" . $array['id']); - - self::startRecording(); - $response = $this->vc->vcGetRequest(); - self::sendAnalytics('Get-Virtual-Card'); - - return $response; - } - - } - - //list all the virtual cards on your profile - function listCards() - { - //set the endpoint for the api call - $this->vc->setEndPoint("v3/virtual-cards"); - - self::startRecording(); - $response = $this->vc->vcGetRequest(); - self::sendAnalytics('List-Cards'); - - return $response; - - } - - //terminate a virtual card on your profile - function terminateCard($array) - { - - if (!isset($array['id'])) { - return ''; - } else { - //set the endpoint for the api call - - $this->vc->setEndPoint("v3/virtual-cards/" . $array['id'] . "/terminate"); - - self::startRecording(); - $response = $this->vc->vcPutRequest(); - self::sendAnalytics('Terminate-Card'); - - return $response; - } - - } - - //fund a virtual card - function fundCard($array) - { - //set the endpoint for the api call - if (gettype($array['amount']) !== 'integer') { - $array['amount'] = (int)$array['amount']; - } - if (!isset($array['currency'])) { - $array['currency'] = 'NGN'; - } - $this->vc->setEndPoint("v3/virtual-cards/" . $array['id'] . "/fund"); - - $data = array( - "amount" => $array['amount'], - "debit_currency" => $array['currency'] - ); - - self::startRecording(); - $response = $this->vc->vcPostRequest($data); - self::sendAnalytics('Terminate-Card'); - - return $response; - } - - // list card transactions - function cardTransactions($array) - { - //set the endpoint for the api call - $this->vc->setEndPoint("v3/virtual-cards/" . $array['id'] . "/transactions"); - - self::startRecording(); - $response = $this->vc->vcGetRequest($array); - self::sendAnalytics('List-Transactions'); - - return $response; - } - - //withdraw funds from card - function cardWithdrawal($array) - { - //set the endpoint for the api call - if (!isset($array['amount'])) { - return ''; - } - - $this->vc->setEndPoint("v3/virtual-cards/" . $array['id'] . "/withdraw"); - - self::startRecording(); - $response = $this->vc->vcPostRequest($array); - self::sendAnalytics('Initiate-Card-Withdrawal'); - - return $response; - } - - function block_unblock_card($array) - { - if (!isset($array['id']) || !isset($array['status_action'])) { - return ''; - } - $this->vc->setEndPoint("v3/virtual-cards/" . $array['id'] . "/" . "status/" . $array['status_action']); - - self::startRecording(); - $response = $this->vc->vcPutRequest(); - self::sendAnalytics('Initiate-Card-Withdrawal'); - - return $response; - - } - -} - diff --git a/library/VoucherPayment.php b/library/VoucherPayment.php deleted file mode 100644 index 22d44fd..0000000 --- a/library/VoucherPayment.php +++ /dev/null @@ -1,45 +0,0 @@ -payment = new Rave($_ENV['SECRET_KEY']); - - } - - function voucher($array) { - //add tx_ref to the paylaod - if (empty($array['tx_ref'])) { - $array['tx_ref'] = $this->payment->txref; - } - - $this->payment->type = 'voucher_payment'; - - $this->payment->eventHandler(new VoucherEventHandler) - //set the endpoint for the api call - ->setEndPoint("v3/charges?type=" . $this->payment->type); - //returns the value from the results - VoucherEventHandler::startRecording(); - $response = $this->payment->chargePayment($array); - VoucherEventHandler::sendAnalytics("Initiate-Voucher-Payment"); - - return $response; - } - - /**you will need to verify the charge - * After validation then verify the charge with the txRef - * You can write out your function to execute when the verification is successful in the onSuccessful function - ***/ - function verifyTransaction($id) { - //verify the charge - return $this->payment->verifyTransaction($id);//Uncomment this line if you need it - } - -} - - - diff --git a/paymentForm.php b/paymentForm.php index d8a4d74..5bd99ab 100644 --- a/paymentForm.php +++ b/paymentForm.php @@ -11,8 +11,8 @@ } #explain1 { - padding: 10px; - margin: 2em; + padding: 20px; + margin: 2em auto auto; } @@ -44,7 +44,7 @@ - + diff --git a/playground/AccountPayment.php b/playground/AccountPayment.php deleted file mode 100644 index b63b33a..0000000 --- a/playground/AccountPayment.php +++ /dev/null @@ -1,62 +0,0 @@ - - "3000", - "type" => "debit_ng_account", - "account_bank" => "044", - "account_number" => "0690000037", - "currency" => "NGN", - "email" => "olaobajua@gmail.com", - "phone_number" => "07067965809", - "fullname" => "Olaobaju Abraham", - "client_ip" => "154.123.220.1", - "device_fingerprint" => "62wd23423rq324323qew1", - "meta" => [ - "flightID" => "213213AS" - ] - ); - -$payment = new AccountPayment(); - -$result = $payment->accountCharge($data); -$sera = serialize($payment); - -$filePath = getcwd().DS."account.txt"; -if (is_writable($filePath)) { - $fp = fopen($filePath, "w"); - fwrite($fp, $sera); - fclose($fp); -} - -echo '
-

Charge Result:

-

'.print_r($result, true).'

-
'; - -//validating the charge by Entering otp..... -echo ''; - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/Bill.php b/playground/Bill.php deleted file mode 100644 index 74e02ba..0000000 --- a/playground/Bill.php +++ /dev/null @@ -1,93 +0,0 @@ - - "NG", - "customer"=> "+23490803840303", - "amount"=> 500, - "recurrence"=> "ONCE", - "type"=> "AIRTIME", - "reference"=> "9300049645534545454332433" -); - -//sample payload for bulkBill() -$bulkdata = array( - "bulk_reference"=>"edf-12de5223d2f3243474543", - "callback_url"=>"https://webhook.site/96374895-154d-4aa0-99b5-709a0a128674", - "bulk_data"=> array( - array( - "country"=> "NG", - "customer"=> "+23490803840303", - "amount"=> 500, - "recurrence"=> "WEEKLY", - "type"=> "AIRTIME", - "reference"=>"930049200929" - ), - array( - "country"=>"NG", - "customer"=> "+23490803840304", - "amount"=> 500, - "recurrence"=> "WEEKLY", - "type"=>"AIRTIME", - "reference"=>"930004912332434232" - ) - ), -); - -$getdata = array( - //"reference"=>"edf-12de5223d2f32434753432" - "id"=>"BIL136", - "product_id"=>"OT150" -); - -$payment = new Bill(); -$result = $payment->payBill($data);//create a bill paymenr -$bulkresult = $payment->bulkBill($bulkdata);//create bulk bill payment.... -$getresult = $payment->getBill($getdata);// get bulk result.... -$getAgencies = $payment->getAgencies(); -$getBillCategories = $payment->getBillCategories(); -// $verify = $payment->verifyTransaction(); -echo '
-

Successful Bill creation Result:

-

'.print_r($result, true).'

-
'; - -echo '
-

Successful Bulk Bill creation Result:

-

'.print_r($bulkresult, true).'

-
'; - -echo '
-

Successful [GET] Billing Result:

-

'.print_r($getresult, true).'

-
'; - -echo '
-

Successful [GET Agencies] Billing Result:

-

'.print_r($getAgencies, true).'

-
'; - -echo '
-

Successful [GET bill categories] Billing Result:

-

'.print_r($getBillCategories, true).'

-
'; - - // echo '
-//

Verified Result:

-//

'.print_r($verify, true).'

-//
'; - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/Ebill.php b/playground/Ebill.php deleted file mode 100644 index ee4ac6a..0000000 --- a/playground/Ebill.php +++ /dev/null @@ -1,58 +0,0 @@ - - "mndkn blls", - "number_of_units"=> 2,//should be a string - "currency"=> "NGN", - "amount"=> 200,//shoould be a string - "phone_number"=> "09384747474", - "email"=>"jake@rad.com", - "tx_ref"=> "akhlm-pstmn-1094434370393", - "ip"=> "127.9.0.7", - "custom_business_name"=> "John Madakin", - "country"=> "NG" -); - -$update = array( - "reference"=>"RVEBLS-2B93A7039017-90937",//on creation of order, this is the flw_ref - "currency"=> "NGN", - "amount"=> "4000" -); - -$payment = new Ebill(); -$result = $payment->order($data);//create an order reciept -$updateResult = $payment->updateOrder($update);//create bulk bill payment.... - -// $verify = $payment->verifyTransaction(); -echo '
-

Successful Ebill creation Result:

-

'.print_r($result, true).'

-
'; - -echo '
-

Order Update Result:

-

'.print_r($updateResult, true).'

-
'; - - - - // echo '
-//

Verified Result:

-//

'.print_r($verify, true).'

-//
'; - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/Mobilemoney.php b/playground/Mobilemoney.php deleted file mode 100644 index 83d4c10..0000000 --- a/playground/Mobilemoney.php +++ /dev/null @@ -1,51 +0,0 @@ - "USS_URG_89245453s2323", - "amount" => "1500", - "type" => "mobile_money_rwanda",// could be mobile_money_rwanda,mobile_money_uganda, mobile_money_zambia, mobile_money_ghana, mobile_money_franco - "currency" => "RWF", - "email" => "ekene@flw.com", - "phone_number" => "054709929220", - "fullname" => "John Madakin", - "client_ip" => "154.123.220.1", - "device_fingerprint" => "62wd23423rq324323qew1", - "meta" => [ - "flightID" => "213213AS" - ] - ); - - -$payment = new MobileMoney(); -$result = $payment->mobilemoney($data); - -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); - echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; - -} - -echo '
-

Charge Result:

-

'.print_r($result, true).'

-
'; - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/Mpesa.php b/playground/Mpesa.php deleted file mode 100644 index d4e2b81..0000000 --- a/playground/Mpesa.php +++ /dev/null @@ -1,55 +0,0 @@ - - "1500", - "type" => "mpesa", - "currency" => "KES", - "email" => "ekene@flw.com", - "phone_number" => "054709929220", - "fullname" => "Ekene Eze", - "client_ip" => "154.123.220.1", - "device_fingerprint" => "62wd23423rq324323qew1", - "meta" => [ - "flightID" => "213213AS" - ] - ); - -$payment = new Mpesa(); - -$result = $payment->mpesa($data); - -echo '
-

Charge Result:

-

'.print_r($result, true).'

-
'; - -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); - echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; -} - - - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/Preexample.php b/playground/Preexample.php deleted file mode 100644 index 1dfc447..0000000 --- a/playground/Preexample.php +++ /dev/null @@ -1,21 +0,0 @@ -cardCharge($card); - -//$capture = $payment->captureFunds(['flw_ref' => 'flw-34552-RE', 'amount' => 2000]);//pass flw_ref and amount - -// $void = $payment->voidFunds(['flw_ref' => 'flw-34552-RE']);//pass only flw_ref - -//$refund = $payment->reFunds(['flw_ref' => 'flw-34552-RE', 'amount' => 2000]);//pass flw_ref and amount - -echo "
";
-print_r($refund);
-echo "
";
-exit;
\ No newline at end of file
diff --git a/playground/TokenCharge.php b/playground/TokenCharge.php
deleted file mode 100644
index 116c4ba..0000000
--- a/playground/TokenCharge.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- "flw-t1nf-1ff187b04cecb4acff4ac62c2b6f7784-m03k",
-     "currency"=> "NGN",
-     "country"=> "NG",
-     "amount"=> 30300,
-     "email"=> "olaobajua@gmail.com",
-     "first_name"=> "Anonymous",
-     "last_name"=> "customer",
-     "client_ip" =>"154.123.220.1",
-     "device_fingerprint" =>"62wd23423rq324323qew1" 
-    );
-
-$payment = new TokenizedCharge();
-$result = $payment->tokenCharge($data);//initiates the charge
-$verify = $payment->verifyTransaction();
-
-
-echo '
-

Charge Result:

-

'.print_r($result, true).'

-
'; - -echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; - - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/Transactions.php b/playground/Transactions.php deleted file mode 100644 index 9b3f2d0..0000000 --- a/playground/Transactions.php +++ /dev/null @@ -1,52 +0,0 @@ - 1000 -); -$fetch_data = array( -'id'=>'345522' -); -$time_data = array( - 'id'=>'3434' -); - -$history = new Transactions(); -$transactions = $history->viewTransactions(); -$transactionfee = $history->getTransactionFee($data); -$verifyTransaction = $history->verifyTransaction($fetch_data); -$timeline = $history->viewTimeline($time_data); - -echo '
-

Get Transactions Result:

-

'.print_r($transactions, true).'

-
'; - -echo '
-

[Get transaction fee] Result:

-

'.print_r($transactionfee, true).'

-
'; - -echo '
-

[Verify Transaction] Result:

-

'.print_r($verifyTransaction, true).'

-
'; - -echo '
-

[Get Timeline] Result:

-

'.print_r($timeline, true).'

-
'; - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/Transfer.php b/playground/Transfer.php deleted file mode 100644 index 62f86b7..0000000 --- a/playground/Transfer.php +++ /dev/null @@ -1,100 +0,0 @@ - "044", - "account_number"=> "0690000040", - "amount"=> 5500, - "narration"=> "Akhlm Pstmn Trnsfr xx007", - "currency"=> "NGN", - "reference"=> "akhlm-pstmnpyt-rfxx007_PMCKDU_1",// read the docs about testing successful and failed transaction. - "callback_url"=> "https://webhook.site/b3e505b0-fe02-430e-a538-22bbbce8ce0d", - "debit_currency"=> "NGN" -); - -//sample payload for bulkBill() -$bulkdata = array( - "title"=> "Staff salary", - "bulk_data"=> array( - array( - "bank_code"=> "044", - "account_number"=> "0690000032", - "amount"=> 45000, - "currency"=> "NGN", - "narration"=> "akhlm blktrnsfr", - "reference"=> "akhlm-blktrnsfr-xx03" - ), - array( - "bank_code"=> "044", - "account_number"=> "0690000034", - "amount"=> 5000, - "currency"=> "NGN", - "narration"=> "akhlm blktrnsfr", - "reference"=> "akhlm-blktrnsfr-xy03" - )) -); - -$getdata = array( - //"reference"=>"edf-12de5223d2f32434753432" - "id"=>"BIL136", - "product_id"=>"OT150" -); - -$listdata = array( - 'status'=>'failed' -); - -$feedata = array( -'currency'=> 'NGN', //if currency is omitted. the default currency of NGN would be used. -'amount'=> 1000 -); - -$payment = new Transfer(); -$result = $payment->singleTransfer($data);//initiate single transfer payment -$createBulkTransfer = $payment->bulkTransfer($bulkdata);// get bulk result.... -$transfers = $payment->listTransfers($listdata);//you can add a payload for the page. you can remove the array if want to get it all. -$getTransferFee = $payment->getTransferFee($feedata); -$verify = $payment->verifyTransaction(); -echo '
-

Transfer Initiation Result:

-

'.print_r($result, true).'

-
'; - -echo '
-

Bulk Transfer creation Result:

-

'.print_r($createBulkTransfer, true).'

-
'; - -echo '
-

Successful [GET Transfer History :

-

'.print_r($transfers, true).'

-
'; - - - -echo '
-

Successful [GET bill categories] Billing Result:

-

'.print_r($getTransferFee, true).'

-
'; - - echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/Ussd.php b/playground/Ussd.php deleted file mode 100644 index 1485385..0000000 --- a/playground/Ussd.php +++ /dev/null @@ -1,53 +0,0 @@ - - "MC-15852309v5050e8", - "account_bank" => "058", - "amount" => "1500", - "currency" =>"NGN", - "email" =>"user@gmail.com", - "phone_number" =>"054709929220", - "fullname" => "John Madakin", - - - ); - -$payment = new Ussd(); -$result = $payment->ussd($data);//initiates the charge -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); -} - - - -echo '
-

Authorize Ussd Transaction:

-

Dial '.$result['meta']['authorization']['note'].'

-
'; - -echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; - - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/VoucherPayment.php b/playground/VoucherPayment.php deleted file mode 100644 index a729115..0000000 --- a/playground/VoucherPayment.php +++ /dev/null @@ -1,56 +0,0 @@ - - "100", - "type"=> "voucher_payment", - "currency"=> "ZAR", - "pin"=> "19203804939000", - "email"=>"ekene@flw.com", - "phone_number" =>"0902620185", - "account_bank" => "058", - "fullname" => "Ekene Eze", - "client_ip" =>"154.123.220.1", - "device_fingerprint" =>"62wd23423rq324323qew1", - "meta" => array( - "flightID"=> "123949494DC" - ) - ); - -$payment = new VoucherPayment(); -$result = $payment->voucher($data); -if(isset($result['data'])){ - $id = $result['data']['id']; - $verify = $payment->verifyTransaction($id); - echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; -} - - -echo '
-

Charge Result:

-

'.print_r($result, true).'

-
'; - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/account.txt b/playground/account.txt deleted file mode 100644 index 9fb64dc..0000000 Binary files a/playground/account.txt and /dev/null differ diff --git a/playground/achPayment.php b/playground/achPayment.php deleted file mode 100644 index cf76482..0000000 --- a/playground/achPayment.php +++ /dev/null @@ -1,45 +0,0 @@ - - "MC-1585230ew9v5050e8", - "amount" => "100", - "type" => "ach_payment", - "currency" => "USD", - "country" => "US", - "email" => "ekene@gmail.com", - "phone_number" => "0902620185", - "fullname" => "Ekene Eze", - "redirect_url" => "http://ekene.com/u/payment-completed", - ); - -$payment = new AchPayment(); - -$result = $payment->achCharge($data); -echo '
-

Charge Result:

-

'.print_r($result, true).'

-
'; - - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/bvn.php b/playground/bvn.php deleted file mode 100644 index 34a7313..0000000 --- a/playground/bvn.php +++ /dev/null @@ -1,23 +0,0 @@ -verifyBVN($bvn_number); - -echo '
-

BVN verification Result:

-

'.print_r($result, true).'

-
'; - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/card.php b/playground/card.php deleted file mode 100644 index ba7df31..0000000 --- a/playground/card.php +++ /dev/null @@ -1,100 +0,0 @@ - -cardCharge($cards[$card_option]); - if(gettype($result) == 'string'){ - echo "
";
-        print_r($result);
-        echo "
"; - exit; - } - - $sera = serialize($payment); - - $filePath = getcwd().DS."payment.txt"; - if (is_writable($filePath)) { - $fp = fopen($filePath, "w"); - fwrite($fp, $sera); - fclose($fp); - - } - $url = 'otp2.php?ref='.$result['data']['flw_ref']."&id=".$result['data']['id']; - header( 'Location:'.$url); - - -} - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - -
-

Card payment Implementation

-
  • -
    - MasterCard/Verve - Pin - - -
    -
  • -
    - NO_auth International Card - No_auth - - -
    -
- -
- -
-
- -
- -
-

Request a ride

-
- -
- -
-
- - - - - - - - - - diff --git a/playground/index.php b/playground/index.php deleted file mode 100644 index 3420dda..0000000 --- a/playground/index.php +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - diff --git a/playground/otp.php b/playground/otp.php deleted file mode 100644 index 25e9fab..0000000 --- a/playground/otp.php +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - Document - -validateTransaction($otp, $ref); - echo ''; - // echo '
- //

Validate Result:

- //

'.print_r($validate, true).'

- //
'; - $id = $_GET['id']; - $verify = $payment->verifyTransaction($id); - echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; - - echo ''; - echo ''; - } - - - } - - break; - - default: - # code... - break; - } - -?> - -
-
- - -
-
- - - - - - - - - - \ No newline at end of file diff --git a/playground/otp2.php b/playground/otp2.php deleted file mode 100644 index 268c4eb..0000000 --- a/playground/otp2.php +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - Document - -validateTransaction($otp, $flwref); - - echo ''; - echo '
-

Validate Result:

-

'.print_r($validate, true).'

-
'; - $id = $_GET['id']; - $verify = $payment->verifyTransaction($id); - echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; - - echo ''; - echo ''; - } - - - } - - break; - - default: - # code... - break; - } - -?> - -
-
- - -
-
- - - - - - - - - - \ No newline at end of file diff --git a/playground/otp3.php b/playground/otp3.php deleted file mode 100644 index 1ab95f0..0000000 --- a/playground/otp3.php +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - Document - -validateTransaction($otp, $flwref); - - echo ''; - echo '
-

Validate Result:

-

'.print_r($validate, true).'

-
'; - $id = $_GET['id']; - $verify = $payment->verifyTransaction($id); - echo '
-

Verified Result:

-

'.print_r($verify, true).'

-
'; - - echo ''; - echo ''; - } - - - } - - break; - - default: - # code... - break; - } - -?> - -
-
- - -
-
- - - - - - - - - - \ No newline at end of file diff --git a/playground/partials/footer.php b/playground/partials/footer.php deleted file mode 100644 index b312e0c..0000000 --- a/playground/partials/footer.php +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/playground/partials/header.php b/playground/partials/header.php deleted file mode 100644 index df482e1..0000000 --- a/playground/partials/header.php +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - Flutterwave PHP-SDK - - - - - - - - - diff --git a/playground/payment.txt b/playground/payment.txt deleted file mode 100644 index f15c8db..0000000 Binary files a/playground/payment.txt and /dev/null differ diff --git a/playground/paymentPlan.php b/playground/paymentPlan.php deleted file mode 100644 index 443db60..0000000 --- a/playground/paymentPlan.php +++ /dev/null @@ -1,67 +0,0 @@ - - 2000, - "name"=> "plan 2", - "interval"=> "monthly", - "duration"=> 48 -); - -$update = array( - "id" => "5356", - "name" => "The Game", - "status" => "Active" -); - -$getdata = array( - "id"=>"5116" -); - -$payment = new PaymentPlan(); -$result = $payment->createPlan($data);//create a Plan reciept -$updateResult = $payment->updatePlan($update);//update a plan.... -$paymentPlans = $payment->getPlans();//list all payment plans.... -$aPlan = $payment->get_a_plan($getdata);//get a payment plans.... - -// $verify = $payment->verifyTransaction(); -echo '
-

Successful PaymentPlan creation Result:

-

'.print_r($result, true).'

-
'; - -echo '
-

PaymentPlan Update Result:

-

'.print_r($updateResult, true).'

-
'; - -echo '
-

PaymentPlan Update Result:

-

'.print_r($paymentPlans, true).'

-
'; -echo '
-

PaymentPlan Update Result:

-

'.print_r($aPlan, true).'

-
'; - - - - // echo '
-//

Verified Result:

-//

'.print_r($verify, true).'

-//
'; - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/preauth.php b/playground/preauth.php deleted file mode 100644 index fdd3ab4..0000000 --- a/playground/preauth.php +++ /dev/null @@ -1,108 +0,0 @@ - -cardCharge($cards[$card_option]); - if(gettype($result) == 'string'){ - echo "
";
-        print_r($result);
-        echo "
"; - exit; - } - $sera = serialize($payment); - - $filePath = getcwd().DS."payment.txt"; - if (is_writable($filePath)) { - $fp = fopen($filePath, "w"); - fwrite($fp, $sera); - fclose($fp); - - } - $url = 'otp3.php?ref='.$result['data']['flw_ref']."&id=".$result['data']['id']; - header( 'Location:'.$url); -} - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - -
-

Select a Payment Method

-
    -
  • -
    - MasterCard/Verve - Pin - - -
    -
  • -
  • -
    - NO_auth International Card - No_auth - - -
    -
  • -
  • -
    - Preauth - Card charge - - -
    -
  • -
-
- -
-
- -
- -
-

Request a ride

- -

N 2000

-
- -
- -
-
- - - - - - - - diff --git a/playground/rave-2020-07-29.log b/playground/rave-2020-07-29.log deleted file mode 100644 index 5202cb2..0000000 --- a/playground/rave-2020-07-29.log +++ /dev/null @@ -1,311 +0,0 @@ -[2020-07-29 16:06:09] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:06:10] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21825222dd4 [] [] -[2020-07-29 16:06:10] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:06:10] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:06:11] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:09:49] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:09:49] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21832d304a4 [] [] -[2020-07-29 16:09:49] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:09:49] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:09:50] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:16:39] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:16:39] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2184c7778a1 [] [] -[2020-07-29 16:16:39] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:16:39] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:16:40] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:16:45] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:16:45] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2184cd95559 [] [] -[2020-07-29 16:16:45] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:16:45] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:16:46] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:18:59] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:18:59] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218553ad125 [] [] -[2020-07-29 16:18:59] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:18:59] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:19:01] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:22:24] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:22:24] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218620bc47d [] [] -[2020-07-29 16:22:24] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:22:24] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:22:25] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:22:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:22:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21862632e91 [] [] -[2020-07-29 16:22:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:22:30] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:22:31] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:23:51] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:23:51] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218677081da [] [] -[2020-07-29 16:23:51] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:23:51] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:23:52] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:24:18] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:24:18] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21869245d97 [] [] -[2020-07-29 16:24:18] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:24:18] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:24:19] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:25:27] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:25:27] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2186d7eba2a [] [] -[2020-07-29 16:25:27] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:25:27] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:25:28] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:27:19] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:27:19] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2187474a259 [] [] -[2020-07-29 16:27:19] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:27:19] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:27:27] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:27:27] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:30:35] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-07-29 16:30:38] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-07-29 16:36:07] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:36:07] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218957b47c7 [] [] -[2020-07-29 16:36:07] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:36:07] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:36:13] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:36:13] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:36:27] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:36:27] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21896b2a116 [] [] -[2020-07-29 16:36:27] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:36:27] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:36:30] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:37:23] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:37:23] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2189a3bf2e6 [] [] -[2020-07-29 16:37:23] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:37:23] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:37:30] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:37:30] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:45:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:45:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218b8ac2156 [] [] -[2020-07-29 16:45:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:45:30] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:45:34] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:45:34] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:46:27] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:46:27] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218bc3388fe [] [] -[2020-07-29 16:46:27] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:46:27] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:46:30] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:46:30] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:51:33] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:51:33] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218cf51c65f [] [] -[2020-07-29 16:51:33] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:51:33] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:51:36] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:51:36] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:52:15] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:52:15] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218d1fcb825 [] [] -[2020-07-29 16:52:15] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:52:15] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:52:19] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:52:19] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:52:29] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:52:29] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218d2dbf39f [] [] -[2020-07-29 16:52:29] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:52:29] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:52:32] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:52:32] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:56:12] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:56:12] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218e0caf4df [] [] -[2020-07-29 16:56:12] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:56:12] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:56:19] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:56:19] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 16:56:21] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 16:56:21] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218e155b242 [] [] -[2020-07-29 16:56:21] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 16:56:21] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 16:56:38] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 16:56:38] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 17:01:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 17:01:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218f4a6d18e [] [] -[2020-07-29 17:01:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 17:01:30] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 17:01:33] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 17:01:33] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 17:02:03] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 17:02:03] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f218f6b24700 [] [] -[2020-07-29 17:02:03] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 17:02:03] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 17:02:09] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 17:02:09] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 17:08:27] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 17:08:27] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2190eb314c3 [] [] -[2020-07-29 17:08:27] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 17:08:27] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 17:08:34] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 17:08:34] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 17:25:51] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 17:25:51] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2194ff97dc5 [] [] -[2020-07-29 17:25:51] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 17:25:51] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 17:25:58] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 17:49:17] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 17:49:17] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f219a7da4f8d [] [] -[2020-07-29 17:49:17] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 17:49:17] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 17:49:20] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 17:50:41] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 17:50:41] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f219ad18fc76 [] [] -[2020-07-29 17:50:41] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 17:50:41] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 17:50:49] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 17:55:55] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 17:55:55] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f219c0bebb9c [] [] -[2020-07-29 17:55:55] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 17:55:55] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 17:55:58] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 17:55:58] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 17:58:44] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 17:58:44] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f219cb497214 [] [] -[2020-07-29 17:58:44] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 17:58:44] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 17:58:47] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 17:58:47] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:07:06] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:07:06] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f219eaa91155 [] [] -[2020-07-29 18:07:06] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:07:06] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:07:10] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:07:10] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:08:53] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:08:53] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f219f158ec85 [] [] -[2020-07-29 18:08:53] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:08:53] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:08:56] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:08:56] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:14:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:14:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a06684d05 [] [] -[2020-07-29 18:14:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:14:30] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:14:32] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:14:32] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:16:34] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:16:34] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a0e2561ed [] [] -[2020-07-29 18:16:34] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:16:34] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:16:36] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:16:36] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:18:38] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:18:38] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a15e67df4 [] [] -[2020-07-29 18:18:38] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:18:38] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:18:41] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:18:41] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:23:44] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:23:44] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a29015dc4 [] [] -[2020-07-29 18:23:44] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:23:44] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:23:48] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:23:48] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:25:35] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:25:35] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a2ff89eae [] [] -[2020-07-29 18:25:35] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:25:35] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:25:38] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:25:38] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:26:16] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:26:16] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a328d069b [] [] -[2020-07-29 18:26:16] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:26:16] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:26:21] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:26:21] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:29:33] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:29:34] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a3ee005bd [] [] -[2020-07-29 18:29:34] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:29:34] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:29:37] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:29:37] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:30:40] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:30:40] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a43065cb6 [] [] -[2020-07-29 18:30:40] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:30:40] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:30:44] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:30:44] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 18:32:45] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:32:45] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a4add039f [] [] -[2020-07-29 18:32:45] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:32:45] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:32:52] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:34:21] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:34:21] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a50d3978f [] [] -[2020-07-29 18:34:21] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:34:21] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:34:27] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:40:09] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:40:09] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a669da12c [] [] -[2020-07-29 18:40:09] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:40:09] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:40:15] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:51:37] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 18:51:37] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21a91984446 [] [] -[2020-07-29 18:51:37] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 18:51:37] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 18:51:42] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 18:51:42] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 19:12:20] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:12:20] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21adf43b5ab [] [] -[2020-07-29 19:12:20] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:13:23] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:13:23] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21ae33d2470 [] [] -[2020-07-29 19:13:23] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:14:20] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:14:20] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21ae6cc2a98 [] [] -[2020-07-29 19:14:20] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:14:25] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:14:25] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21ae716d820 [] [] -[2020-07-29 19:14:25] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:14:25] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 19:14:30] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 19:14:30] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 19:14:42] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-07-29 19:14:47] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-07-29 19:14:52] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:14:52] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21ae8c75673 [] [] -[2020-07-29 19:14:52] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:16:14] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:16:14] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21aedee3200 [] [] -[2020-07-29 19:16:14] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:16:17] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:16:17] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21aee106b64 [] [] -[2020-07-29 19:16:17] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:16:17] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 19:16:22] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 19:16:22] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-07-29 19:17:29] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:17:29] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21af29a49bc [] [] -[2020-07-29 19:17:29] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:17:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:17:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21af2ae8782 [] [] -[2020-07-29 19:17:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:17:31] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:17:31] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21af2b21e4e [] [] -[2020-07-29 19:17:31] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:17:33] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:17:33] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21af2d03970 [] [] -[2020-07-29 19:17:33] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:17:33] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 19:20:01] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:20:02] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21afc200078 [] [] -[2020-07-29 19:20:02] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:20:06] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:20:06] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21afc62d6f7 [] [] -[2020-07-29 19:20:06] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:20:06] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:20:06] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21afc6c29ac [] [] -[2020-07-29 19:20:06] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:20:08] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:20:08] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21afc86bcf2 [] [] -[2020-07-29 19:20:08] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:20:08] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 19:20:15] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 19:20:22] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-07-29 19:20:24] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-07-29 19:20:36] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:20:36] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21afe43dc84 [] [] -[2020-07-29 19:20:36] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:20:38] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-07-29 19:20:38] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f21afe684b20 [] [] -[2020-07-29 19:20:38] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-07-29 19:20:38] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-07-29 19:20:45] flutterwave/rave.NOTICE: Payment requires validation.. [] [] -[2020-07-29 19:20:51] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-07-29 19:20:53] flutterwave/rave.NOTICE: Verifying transaction... [] [] diff --git a/playground/rave-2020-08-03.log b/playground/rave-2020-08-03.log deleted file mode 100644 index f042fa4..0000000 --- a/playground/rave-2020-08-03.log +++ /dev/null @@ -1,98 +0,0 @@ -[2020-08-03 23:33:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:33:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2882aa43765 [] [] -[2020-08-03 23:33:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:33:32] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:33:32] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2882ac0e299 [] [] -[2020-08-03 23:33:32] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:33:32] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:34:57] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:34:57] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288301bfa47 [] [] -[2020-08-03 23:34:57] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:34:57] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:36:00] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:36:00] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288340764d1 [] [] -[2020-08-03 23:36:00] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:36:00] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:37:05] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:37:05] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288381234e6 [] [] -[2020-08-03 23:37:05] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:37:07] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:37:07] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2883832be1c [] [] -[2020-08-03 23:37:07] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:37:09] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:37:09] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28838542364 [] [] -[2020-08-03 23:37:09] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:37:09] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:37:14] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-03 23:37:17] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:37:17] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28838d72422 [] [] -[2020-08-03 23:37:17] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:38:47] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:38:47] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2883e7e6d13 [] [] -[2020-08-03 23:38:47] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:38:49] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:38:49] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2883e97e129 [] [] -[2020-08-03 23:38:49] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:38:49] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:38:56] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-03 23:39:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:39:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288412f23ff [] [] -[2020-08-03 23:39:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:39:30] flutterwave/rave.NOTICE: Processing transfer... [] [] -[2020-08-03 23:39:32] flutterwave/rave.NOTICE: Processing bulk transfer... [] [] -[2020-08-03 23:39:33] flutterwave/rave.NOTICE: Fetching list of transfers... [] [] -[2020-08-03 23:39:35] flutterwave/rave.NOTICE: Fetching applicable fees... [] [] -[2020-08-03 23:39:36] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-03 23:40:12] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:40:12] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28843cd8712 [] [] -[2020-08-03 23:40:12] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:40:14] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:40:14] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28843e385b2 [] [] -[2020-08-03 23:40:14] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:40:14] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:40:20] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-03 23:41:27] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:41:27] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2884875d019 [] [] -[2020-08-03 23:41:27] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:41:27] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:41:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:41:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28848ac5d11 [] [] -[2020-08-03 23:41:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:41:30] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:41:49] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:41:49] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28849d8c9e2 [] [] -[2020-08-03 23:41:49] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:41:49] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:41:52] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:41:52] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2884a08d2b6 [] [] -[2020-08-03 23:41:52] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:41:52] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:42:11] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:42:11] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2884b3034be [] [] -[2020-08-03 23:42:11] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:42:11] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:44:01] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:44:02] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28852200f8a [] [] -[2020-08-03 23:44:02] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:44:02] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:44:06] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:44:06] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28852639c9d [] [] -[2020-08-03 23:44:06] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:44:06] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:44:08] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-03 23:44:11] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:44:11] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28852b7357a [] [] -[2020-08-03 23:44:11] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:44:11] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:44:18] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-03 23:49:37] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:49:37] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28867161ab8 [] [] -[2020-08-03 23:49:37] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:49:38] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:49:38] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288672d61e5 [] [] -[2020-08-03 23:49:38] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-03 23:49:38] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-03 23:49:46] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-03 23:50:29] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-03 23:50:29] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f2886a5c5f5f [] [] -[2020-08-03 23:50:29] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] diff --git a/playground/rave-2020-08-04.log b/playground/rave-2020-08-04.log deleted file mode 100644 index fb51103..0000000 --- a/playground/rave-2020-08-04.log +++ /dev/null @@ -1,222 +0,0 @@ -[2020-08-04 00:01:09] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:01:09] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288925c1430 [] [] -[2020-08-04 00:01:09] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:01:11] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:01:11] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28892719e51 [] [] -[2020-08-04 00:01:11] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:01:11] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-04 00:01:16] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-04 00:03:14] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-08-04 00:03:16] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 00:05:27] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-08-04 00:05:33] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 00:05:41] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:05:41] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288a35ae352 [] [] -[2020-08-04 00:05:41] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:05:43] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:05:43] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288a37a8145 [] [] -[2020-08-04 00:05:43] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:05:43] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-04 00:05:49] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-04 00:05:56] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-08-04 00:06:04] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 00:08:57] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:08:58] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288afa00d1e [] [] -[2020-08-04 00:08:58] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:08:59] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:08:59] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288afbd67c2 [] [] -[2020-08-04 00:08:59] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:09:01] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:09:01] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288afd947d8 [] [] -[2020-08-04 00:09:01] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:09:01] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-04 00:09:07] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-04 00:09:14] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-08-04 00:09:21] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 00:12:08] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:12:08] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288bb82486a [] [] -[2020-08-04 00:12:08] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:12:10] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:12:10] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288bba42216 [] [] -[2020-08-04 00:12:10] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:12:12] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:12:12] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288bbc2240d [] [] -[2020-08-04 00:12:12] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:12:12] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-04 00:12:18] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-04 00:15:22] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:15:22] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288c7a81270 [] [] -[2020-08-04 00:15:22] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:15:24] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:15:24] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288c7c056af [] [] -[2020-08-04 00:15:24] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:15:24] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:15:24] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288c7c61305 [] [] -[2020-08-04 00:15:24] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:15:25] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:15:25] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288c7d6f420 [] [] -[2020-08-04 00:15:25] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:15:25] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-04 00:15:31] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-04 00:15:37] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-08-04 00:15:40] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 00:22:17] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:17] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e1968b61 [] [] -[2020-08-04 00:22:17] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:22:19] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:19] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e1b01ff1 [] [] -[2020-08-04 00:22:19] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:22:20] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:20] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e1ca0e42 [] [] -[2020-08-04 00:22:20] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:22:20] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:20] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e1cdb4e2 [] [] -[2020-08-04 00:22:20] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e1d22ffd [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e1d4648d [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e1d74674 [] [] -[2020-08-04 00:22:21] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:22:22] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:22] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e1ef1cd9 [] [] -[2020-08-04 00:22:22] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:22:22] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-04 00:22:26] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:pin [] [] -[2020-08-04 00:22:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:22:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e269d377 [] [] -[2020-08-04 00:22:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:23:29] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:23:29] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288e610498e [] [] -[2020-08-04 00:23:29] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:23:29] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-04 00:23:35] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-04 00:25:23] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:25:24] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288ed400c2c [] [] -[2020-08-04 00:25:24] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:26:17] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 00:26:17] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f288f094fba6 [] [] -[2020-08-04 00:26:17] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 00:26:17] flutterwave/rave.NOTICE: Processing transfer... [] [] -[2020-08-04 00:26:18] flutterwave/rave.NOTICE: Processing bulk transfer... [] [] -[2020-08-04 00:26:19] flutterwave/rave.NOTICE: Fetching list of transfers... [] [] -[2020-08-04 00:26:20] flutterwave/rave.NOTICE: Fetching applicable fees... [] [] -[2020-08-04 00:26:21] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 02:08:40] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 02:08:40] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28a708ecbea [] [] -[2020-08-04 02:08:40] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 02:08:42] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 02:08:42] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28a70a9ac4d [] [] -[2020-08-04 02:08:42] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 02:08:42] flutterwave/rave.NOTICE: Checking payment details.. [] [] -[2020-08-04 02:08:50] flutterwave/rave.NOTICE: Payment requires otp validation...authmodel:otp [] [] -[2020-08-04 02:08:59] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-08-04 02:09:03] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:15:34] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:15:34] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28b6b636852 [] [] -[2020-08-04 03:15:34] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:15:47] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-08-04 03:15:47] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:18:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:18:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28b7660f0e8 [] [] -[2020-08-04 03:18:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:18:43] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-08-04 03:18:43] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:18:55] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:18:55] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28b77f20eb1 [] [] -[2020-08-04 03:18:55] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:19:03] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-08-04 03:19:03] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:21:46] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:21:46] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28b82a18177 [] [] -[2020-08-04 03:21:46] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:21:46] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:26:02] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:26:02] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28b92a46b81 [] [] -[2020-08-04 03:26:02] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:26:04] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:29:35] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:29:35] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28b9ff84168 [] [] -[2020-08-04 03:29:35] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:29:36] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:32:20] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:32:20] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28baa4de60b [] [] -[2020-08-04 03:32:20] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:32:21] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:34:17] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:34:17] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28bb199acd1 [] [] -[2020-08-04 03:34:17] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:34:20] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:34:55] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:34:55] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28bb3fb1115 [] [] -[2020-08-04 03:34:55] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:35:03] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:37:01] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:37:01] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28bbbd29fe8 [] [] -[2020-08-04 03:37:01] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:37:08] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:40:23] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:40:23] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28bc8737cca [] [] -[2020-08-04 03:40:23] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:40:30] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 03:52:25] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 03:52:25] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28bf599f829 [] [] -[2020-08-04 03:52:25] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 03:52:29] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-08-04 03:52:29] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 04:34:33] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:34:33] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28c9397561a [] [] -[2020-08-04 04:34:33] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:34:40] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-08-04 04:34:40] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 04:35:08] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:35:08] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28c95ca8835 [] [] -[2020-08-04 04:35:08] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:36:09] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:36:09] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28c999d2fa9 [] [] -[2020-08-04 04:36:09] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:41:38] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:41:38] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cae2978d6 [] [] -[2020-08-04 04:41:38] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:43:59] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:43:59] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cb6fedc27 [] [] -[2020-08-04 04:43:59] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:51:02] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:51:02] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cd16cc4c7 [] [] -[2020-08-04 04:51:02] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:51:58] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:51:58] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cd4e5fe24 [] [] -[2020-08-04 04:51:58] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:54:35] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:54:35] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cdeb7b981 [] [] -[2020-08-04 04:54:35] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:58:10] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:58:10] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cec2a8ea5 [] [] -[2020-08-04 04:58:10] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:58:59] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:58:59] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cef3abfe1 [] [] -[2020-08-04 04:58:59] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:59:02] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 04:59:10] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:59:10] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cefe6f432 [] [] -[2020-08-04 04:59:10] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 04:59:56] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 04:59:56] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cf2c92583 [] [] -[2020-08-04 04:59:56] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 05:00:39] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 05:00:39] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cf572d15b [] [] -[2020-08-04 05:00:39] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 05:02:33] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 05:02:33] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cfc9f1065 [] [] -[2020-08-04 05:02:33] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 05:02:56] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 05:02:56] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28cfe0a41a8 [] [] -[2020-08-04 05:02:56] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-08-04 05:03:06] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-08-04 05:03:06] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-08-04 05:04:43] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-08-04 05:04:43] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f28d04bb96d7 [] [] -[2020-08-04 05:04:43] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] diff --git a/playground/rave-2020-10-28.log b/playground/rave-2020-10-28.log deleted file mode 100644 index d947225..0000000 --- a/playground/rave-2020-10-28.log +++ /dev/null @@ -1,10 +0,0 @@ -[2020-10-28 15:10:37] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-10-28 15:10:37] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f9989ed823ae [] [] -[2020-10-28 15:10:37] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-10-28 15:10:37] flutterwave/rave.NOTICE: creating Ebill order for customer with email: jake@rad.com [] [] -[2020-10-28 15:10:38] flutterwave/rave.NOTICE: updating Ebill order.. [] [] -[2020-10-28 15:10:45] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-10-28 15:10:45] flutterwave/rave.NOTICE: Generated Reference Number....RV_5f9989f525236 [] [] -[2020-10-28 15:10:45] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-10-28 15:10:45] flutterwave/rave.NOTICE: creating Ebill order for customer with email: jake@rad.com [] [] -[2020-10-28 15:10:46] flutterwave/rave.NOTICE: updating Ebill order.. [] [] diff --git a/playground/rave-2020-11-20.log b/playground/rave-2020-11-20.log deleted file mode 100644 index 3a71f95..0000000 --- a/playground/rave-2020-11-20.log +++ /dev/null @@ -1,14 +0,0 @@ -[2020-11-20 12:12:30] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-20 12:12:30] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb7a49ea3a75 [] [] -[2020-11-20 12:12:30] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-20 12:12:43] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-20 12:12:43] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb7a4ab42677 [] [] -[2020-11-20 12:12:43] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-20 12:12:50] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-11-20 12:12:52] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-20 12:13:22] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-20 12:13:22] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb7a4d2b510b [] [] -[2020-11-20 12:13:22] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-20 12:13:22] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-20 12:13:22] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb7a4d2eed4f [] [] -[2020-11-20 12:13:22] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] diff --git a/playground/rave-2020-11-21.log b/playground/rave-2020-11-21.log deleted file mode 100644 index 161e98e..0000000 --- a/playground/rave-2020-11-21.log +++ /dev/null @@ -1,92 +0,0 @@ -[2020-11-21 02:04:57] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:04:57] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb867b906e7e [] [] -[2020-11-21 02:04:57] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:07:18] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:07:18] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb868467e603 [] [] -[2020-11-21 02:07:18] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:07:30] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-11-21 02:07:32] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:07:38] flutterwave/rave.NOTICE: Validating otp... [] [] -[2020-11-21 02:07:39] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:11:34] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:11:34] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86946868a3 [] [] -[2020-11-21 02:11:34] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:22:13] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:22:13] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86bc5eff71 [] [] -[2020-11-21 02:22:13] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:22:13] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:22:16] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:25:06] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:25:06] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86c726d96a [] [] -[2020-11-21 02:25:06] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:25:06] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:25:09] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:26:43] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:26:43] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86cd37b6d5 [] [] -[2020-11-21 02:26:43] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:26:43] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:26:47] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:31:57] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:31:57] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86e0dc23f7 [] [] -[2020-11-21 02:31:57] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:31:57] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:32:16] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:32:16] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86e20a2c30 [] [] -[2020-11-21 02:32:16] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:32:16] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:32:24] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:32:24] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86e286d829 [] [] -[2020-11-21 02:32:24] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:32:24] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:32:27] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:34:18] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:34:18] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86e9a170b7 [] [] -[2020-11-21 02:34:18] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:34:18] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:35:19] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:35:19] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86ed7bf1c9 [] [] -[2020-11-21 02:35:19] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:35:19] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:35:24] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:36:16] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:36:16] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86f10b8e9c [] [] -[2020-11-21 02:36:16] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:36:16] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:39:20] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:39:20] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb86fc8e4f1b [] [] -[2020-11-21 02:39:20] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:39:20] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:39:26] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:42:15] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:42:15] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb870770ee80 [] [] -[2020-11-21 02:42:15] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:42:15] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:44:03] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:44:03] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb870e34ce00 [] [] -[2020-11-21 02:44:03] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:44:03] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:44:08] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:44:45] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:44:45] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb8710d2db99 [] [] -[2020-11-21 02:44:45] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:44:45] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:44:54] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:44:54] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb87116e42c8 [] [] -[2020-11-21 02:44:54] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:44:54] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:45:00] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 02:51:03] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 02:51:03] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb872874747d [] [] -[2020-11-21 02:51:03] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 02:51:03] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 02:51:08] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 03:27:07] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 03:27:07] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb87afbe6321 [] [] -[2020-11-21 03:27:07] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 03:27:07] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 03:27:14] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-21 03:31:19] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-21 03:31:19] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb87bf7b70a3 [] [] -[2020-11-21 03:31:19] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-21 03:31:19] flutterwave/rave.NOTICE: Getting all Transactions... [] [] -[2020-11-21 03:31:25] flutterwave/rave.NOTICE: Verifying transaction... [] [] diff --git a/playground/rave-2020-11-22.log b/playground/rave-2020-11-22.log deleted file mode 100644 index 82353b8..0000000 --- a/playground/rave-2020-11-22.log +++ /dev/null @@ -1,11 +0,0 @@ -[2020-11-22 06:00:48] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-22 06:00:48] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb9f08065c5f [] [] -[2020-11-22 06:00:48] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-22 06:01:22] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-22 06:01:22] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb9f0a2eaaaa [] [] -[2020-11-22 06:01:22] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] -[2020-11-22 06:01:32] flutterwave/rave.NOTICE: Payment requires otp validation... [] [] -[2020-11-22 06:01:35] flutterwave/rave.NOTICE: Verifying transaction... [] [] -[2020-11-22 06:03:25] flutterwave/rave.NOTICE: Generating Reference Number.... [] [] -[2020-11-22 06:03:25] flutterwave/rave.NOTICE: Generated Reference Number....RV_5fb9f11d0c146 [] [] -[2020-11-22 06:03:25] flutterwave/rave.NOTICE: Rave Class Initializes.... [] [] diff --git a/playground/recipient.php b/playground/recipient.php deleted file mode 100644 index 0d58cea..0000000 --- a/playground/recipient.php +++ /dev/null @@ -1,60 +0,0 @@ - "044", - "account_number"=> "0690000036", -); -$fetchdata = array( - 'id' => '6153' -); -$deldata = array( - 'id'=>'7236' -); - -$payment = new Recipient(); -$recipient1 = $payment->createRecipient($data);//Create a recipient for transfer -$recipients = $payment->listRecipients();// get all existing recipients -$recipient = $payment->fetchBeneficiary($fetchdata);//fetch a specific recipient. -$deleteRecipient = $payment->deleteBeneficiary($deldata);//delete recipient - -echo '
-

Create Recipient Result:

-

'.print_r($recipient1, true).'

-
'; - -echo '
-

[GET Recipients] Result:

-

'.print_r($recipients, true).'

-
'; - -echo '
-

[GET a Recipient] Result :

-

'.print_r($recipient, true).'

-
'; - -echo '
-

Successful [Delete Recipient] :

-

'.print_r($deleteRecipient, true).'

-
'; - - - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/subaccount.php b/playground/subaccount.php deleted file mode 100644 index 41e18d6..0000000 --- a/playground/subaccount.php +++ /dev/null @@ -1,75 +0,0 @@ - "044", - "account_number"=> "0690000037", - "business_name"=> "Eternal Blue", - "business_email"=> "petya@stux.net", - "business_contact"=> "Anonymous", - "business_contact_mobile"=> "090890382", - "business_mobile"=> "09087930450", - "country"=> "NG", - "meta"=> array( - array( - "meta_name"=> "mem_adr", - "meta_value"=> "0x16241F327213" - ) - ), - "split_type"=> "percentage", - "split_value"=> 0.5 -); - -$fetch_data = array( - "id" => "RS_9247C52A37C5EB15C7E8E974CD1B35D7" -); - -$update_data = array( - "id" => "2755", - "business_name"=>"Mad O!", - "business_email"=> "mad@o.enterprises", - "account_bank"=> "044", - "account_number"=> "0690000040", - "split_type"=> "flat", - "split_value"=> "200" -); - -$subaccount = new Subaccount(); -$createSubaccount = $subaccount->createSubaccount($data); -$getSubaccounts = $subaccount->getSubaccounts(); -$fetchSubaccount = $subaccount->fetchSubaccount($fetch_data); -$updateSubaccount = $subaccount->updateSubaccount($update_data); - -echo '
-

Subaccount Creation Result:

-

'.print_r($createSubaccount, true).'

-
'; - -echo '
-

[Get Subaccounts] Result:

-

'.print_r($getSubaccounts, true).'

-
'; - -echo '
-

[Get Subaccounts] Result:

-

'.print_r($fetchSubaccount, true).'

-
'; - -echo '
-

[Get Subaccounts] Result:

-

'.print_r($updateSubaccount, true).'

-
'; - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/subscription.php b/playground/subscription.php deleted file mode 100644 index abcafb1..0000000 --- a/playground/subscription.php +++ /dev/null @@ -1,66 +0,0 @@ -getAllSubscription();//gets all existing subscription -$resultActivate = $subscription->activateSubscription($id);// activates a subscription plan -$resultCancel = $subscription->cancelSubscription($cid);// activates a subscription plan - -echo '
-

All Subscriptions Result:

-

'.print_r($subscriptions, true).'

-
'; - -echo '
-

Activate Subscription Result:

-

'.print_r($resultActivate, true).'

-
'; - -echo '
-

Cancel Subscription Result :

-

'.print_r($resultCancel, true).'

-
'; - - - - - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - - - - - - - - - - - - - - - - - - - - diff --git a/playground/testcards.php b/playground/testcards.php deleted file mode 100644 index 855a48b..0000000 --- a/playground/testcards.php +++ /dev/null @@ -1,114 +0,0 @@ - array( - "card_number"=> "5531886652142950", - "cvv"=> "564", - "expiry_month"=> "09", - "expiry_year"=> "22", - "currency"=> "NGN", - "amount" => "1000", - "fullname"=> "Ekene Eze", - "email"=> "ekene@flw.com", - "phone_number"=> "0902620185", - "fullname" => "temi desola", - //"tx_ref"=> "MC-3243e",// should be unique for every transaction - "redirect_url"=> "https://webhook.site/3ed41e38-2c79-4c79-b455-97398730866c", - "authorization"=> [ - "mode"=> "pin", - "pin"=> "3310", - ] - ), - 'card2' => array( - "card_number"=> "4556052704172643", - "cvv" => "899", - "expiry_month"=> "01", - "expiry_year"=> "21", - "currency"=> "NGN", - "amount"=> "1000", - "fullname"=> "Ekene Eze", - "email"=> "ekene@flw.com", - "phone_number"=> "0902620185", - "fullname"=> "temi desola", - //"tx_ref"=> "MC-3243e",// should be unique for every transaction - "redirect_url"=> "https://webhook.site/3ed41e38-2c79-4c79-b455-97398730866c", - "authorization"=> [ - "mode" => "avs_noauth", - "city"=> "Sampleville", - "address"=> "3310 sample street ", - "state"=> "Simplicity", - "country"=> "Simple", - "zipcode"=> "000000", - ] - ), - 'card3' => array( - "card_number"=> "5531886652142950", - "cvv"=> "564", - "expiry_month"=> "09", - "expiry_year"=> "22", - "currency"=> "NGN", - "country" => "NG", - "amount" => "1000", - "tx_ref" => "BY-34552-RE", - "fullname"=> "Ekene Eze", - "email"=> "ekene@flw.com", - "phone_number"=> "0902620185", - "fullname" => "temi desola", - //"tx_ref"=> "MC-3243e",// should be unique for every transaction - "redirect_url"=> "https://webhook.site/3ed41e38-2c79-4c79-b455-97398730866c", - "authorization"=> [ - "mode"=> "pin", - "pin"=> "3310", - ], - "preauthorize" => true, - "usesecureauth" => true, - ), -]; - -return $cards; - -$card1 = array( - "card_number"=> "5531886652142950", - "cvv"=> "564", - "expiry_month"=> "09", - "expiry_year"=> "22", - "currency" => "NGN", - "amount" => "1000", - "fullname"=> "Ekene Eze", - "email" => "ekene@flw.com", - "phone_number"=> "0902620185", - "fullname"=> "temi desola", - //"tx_ref"=> "MC-3243e",// should be unique for every transaction - "redirect_url"=> "https://webhook.site/3ed41e38-2c79-4c79-b455-97398730866c", - // "authorization"=> [ - // "mode"=> "pin", - // "pin"=> "3310", - // ] -); - -$card2 = array( - "card_number"=> "4556052704172643", - "cvv" => "899", - "expiry_month"=> "01", - "expiry_year"=> "21", - "currency"=> "NGN", - "amount"=> "1000", - "fullname"=> "Ekene Eze", - "email"=> "ekene@flw.com", - "phone_number"=> "0902620185", - "fullname"=> "temi desola", - //"tx_ref"=> "MC-3243e",// should be unique for every transaction - "redirect_url"=> "https://webhook.site/3ed41e38-2c79-4c79-b455-97398730866c", - "authorization"=> [ - "mode" => "avs_noauth", - "city"=> "Sampleville", - "address"=> "3310 sample street ", - "state"=> "Simplicity", - "country"=> "Simple", - "zipcode"=> "000000", - ] - -); - - diff --git a/playground/uber/assets/images/car.svg b/playground/uber/assets/images/car.svg deleted file mode 100644 index 41352c4..0000000 --- a/playground/uber/assets/images/car.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/playground/virtualAccount.php b/playground/virtualAccount.php deleted file mode 100644 index 74e9302..0000000 --- a/playground/virtualAccount.php +++ /dev/null @@ -1,72 +0,0 @@ - - "johnmadakin@allstar.com", - "duration"=> 5, - "frequency"=> 5, - "amount"=>"22000", - "is_permanent"=> true, - "tx_ref"=> "jhn-mdkn-101923123463" -); - -$bulkdata = array( - "accounts"=> 5, - "email"=> "sam@son.com", - "is_permanent"=> true, - "tx_ref"=> "jhn-mndkn-012439283422" -); - -$batch = array('batch_id' => 'RND_2641579516055928'); - -$getdata = array( - "order_ref"=>"URF_1590362018488_8875935" -); - -$account = new VirtualAccount(); -$result = $account->createVirtualAccount($data);//create a virtak account -$bulkAccounts = $account->createBulkAccounts($bulkdata);//create bulk v accounts -$virtualAccounts = $account->getBulkAccounts($batch);//list all bulk accounts -$virtualAccount = $account->getAccountNumber($getdata);//get an account. - -// $verify = $payment->verifyTransaction(); -echo '
-

Virtual Account creation Result:

-

'.print_r($result, true).'

-
'; - -echo '
-

Bulk Account creation Result:

-

'.print_r($bulkAccounts, true).'

-
'; - -echo '
-

Get Accounts Result:

-

'.print_r($virtualAccounts, true).'

-
'; -echo '
-

Get Account Result:

-

'.print_r($virtualAccount, true).'

-
'; - - - - // echo '
-//

Verified Result:

-//

'.print_r($verify, true).'

-//
'; - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/playground/virtualCard.php b/playground/virtualCard.php deleted file mode 100644 index 1f15793..0000000 --- a/playground/virtualCard.php +++ /dev/null @@ -1,97 +0,0 @@ - -"NGN", - "amount"=>20000, - "billing_name"=>"Jermaine Graham", - "billing_address"=>"2014 Forest Hills Drive", - "billing_city"=>"Node", - "billing_state"=>"Javascript", - "billing_postal_code"=>"000009", - "billing_country"=>"NG", - "callback_url"=>"https://webhook.site/96374895-154d-4aa0-99b5-709a0a128674" - ); - - $trns_data = array('id'=> 'a41de883-c8da-45a0-9b23-37780c88285f'); - $getCardData = array('id'=>'7a81d279-a07a-4775-a55a-5fa2c98e20ae'); - $terminate_data = array('id'=>'1cb36826-8e05-40d6-8b9e-7f7439a141cb'); - $fund_data = array('id'=>'1cb36826-8e05-40d6-8b9e-7f7439a141cb', 'amount'=>'2000', 'debit_currency'=>'NGN'); - $withdraw_data = array('id'=>'1cb36826-8e05-40d6-8b9e-7f7439a141cb', 'amount'=>'500'); - $blockCard_data = array('id' => '1cb36826-8e05-40d6-8b9e-7f7439a141cb', 'status_action'=>'block'); -$card = new VirtualCard(); -$createCard = $card->createCard($data);//initiates the charge -$getCard = $card->getCard($getCardData); -$getCards = $card->listCards(); -$terminate = $card->terminateCard($terminate_data); -$fund = $card->fundCard($fund_data); -$transactions = $card->cardTransactions($trns_data); -$withdraw = $card->cardWithdrawal($withdraw_data); -$block_unblock = $card->block_unblock_card($blockCard_data); - - - -echo '
-

Create Card Result:

-

'.print_r($createCard, true).'

-
'; - - -echo '
-

Get Card Result:

-

'.print_r($getCard, true).'

-
'; - -echo '
-

Get Cards Result:

-

'.print_r($getCards, true).'

-
'; - -echo '
-

Terminate card Result:

-

'.print_r($terminate, true).'

-
'; - -echo '
-

Fund Card Result:

-

'.print_r($fund, true).'

-
'; - -echo '
-

Get Card Transactions Result:

-

'.print_r($transactions, true).'

-
'; - -echo '
-

Card Withdrawal Result:

-

'.print_r($withdraw, true).'

-
'; - -echo '
-

Block Card Result:

-

'.print_r($block_unblock, true).'

-
'; - - - - - - - - - - -include('partials/footer.php');//this is just to load the jquery and js scripts. - -?> - - diff --git a/processPayment.php b/processPayment.php index 9e7d2fc..a5da1a5 100644 --- a/processPayment.php +++ b/processPayment.php @@ -1,22 +1,22 @@ status === 'successful') { - if ($transactionData->currency == $_SESSION['currency'] && $transactionData->amount == $_SESSION['amount']) { - + if ($transactionData->currency === $_SESSION['currency'] && $transactionData->amount === $_SESSION['amount']) { if ($_SESSION['publicKey']) { - header('Location: ' . getURL($_SESSION['successurl'], array('event' => 'successful'))); - $_SESSION = array(); + header('Location: ' . getURL($_SESSION['successurl'], ['event' => 'successful'])); + $_SESSION = []; session_destroy(); } } else { if ($_SESSION['publicKey']) { - header('Location: ' . getURL($_SESSION['failureurl'], array('event' => 'suspicious'))); - $_SESSION = array(); + header('Location: ' . getURL($_SESSION['failureurl'], ['event' => 'suspicious'])); + $_SESSION = []; session_destroy(); } } @@ -102,13 +100,14 @@ function onSuccessful($transactionData) { /** * This is called only when a transaction failed * */ - function onFailure($transactionData) { + public function onFailure($transactionData): void + { // Get the transaction from your DB using the transaction reference (txref) // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) // You can also redirect to your failure page from here if ($_SESSION['publicKey']) { - header('Location: ' . getURL($_SESSION['failureurl'], array('event' => 'failed'))); - $_SESSION = array(); + header('Location: ' . getURL($_SESSION['failureurl'], ['event' => 'failed'])); + $_SESSION = []; session_destroy(); } } @@ -116,26 +115,29 @@ function onFailure($transactionData) { /** * This is called when a transaction is requeryed from the payment gateway * */ - function onRequery($transactionReference) { + public function onRequery($transactionReference): void + { // Do something, anything! } /** * This is called a transaction requery returns with an error * */ - function onRequeryError($requeryResponse) { + public function onRequeryError($requeryResponse): void + { echo 'the transaction was not found'; } /** * This is called when a transaction is canceled by the user * */ - function onCancel($transactionReference) { + public function onCancel($transactionReference): void + { // Do something, anything! - // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution + // Note: Something's a payment can be successful, before a user clicks the cancel button so proceed with caution if ($_SESSION['publicKey']) { - header('Location: ' . getURL($_SESSION['failureurl'], array('event' => 'canceled'))); - $_SESSION = array(); + header('Location: ' . getURL($_SESSION['failureurl'], ['event' => 'canceled'])); + $_SESSION = []; session_destroy(); } } @@ -143,13 +145,14 @@ function onCancel($transactionReference) { /** * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. * */ - function onTimeout($transactionReference, $data) { + public function onTimeout($transactionReference, $data): void + { // Get the transaction from your DB using the transaction reference (txref) // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. - // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects + // Ask the customer to contact your support, and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects if ($_SESSION['publicKey']) { - header('Location: ' . getURL($_SESSION['failureurl'], array('event' => 'timedout'))); - $_SESSION = array(); + header('Location: ' . getURL($_SESSION['failureurl'], ['event' => 'timedout'])); + $_SESSION = []; session_destroy(); } } @@ -158,9 +161,9 @@ function onTimeout($transactionReference, $data) { if (isset($postData['amount'])) { // Make payment $payment - ->eventHandler(new myEventHandler) + ->eventHandler(new myEventHandler()) ->setAmount($postData['amount']) - ->setPaymentOptions($postData['payment_options']) // value can be card, account or both + ->setPaymentOptions($postData['payment_options']) // value can be a card, account or both ->setDescription($postData['description']) ->setLogo($postData['logo']) ->setTitle($postData['title']) @@ -179,17 +182,16 @@ function onTimeout($transactionReference, $data) { if (isset($getData['cancelled'])) { // Handle canceled payments $payment - ->eventHandler(new myEventHandler) - ->paymentCanceled($getData['cancelled']); + ->eventHandler(new myEventHandler()) + ->paymentCanceled($getData['cancel_ref']); } elseif (isset($getData['tx_ref'])) { // Handle completed payments $payment->logger->notice('Payment completed. Now requerying payment.'); $payment - ->eventHandler(new myEventHandler) + ->eventHandler(new myEventHandler()) ->requeryTransaction($getData['transaction_id']); } else { - $payment->logger->warn('Stop!!! Please pass the txref parameter!'); + $payment->logger->warning('Stop!!! Please pass the txref parameter!'); echo 'Stop!!! Please pass the txref parameter!'; } } - diff --git a/setup.php b/setup.php index 36d2699..0926de6 100644 --- a/setup.php +++ b/setup.php @@ -1,6 +1,34 @@ safeLoad(); \ No newline at end of file +$dotenv = Dotenv::createImmutable(__DIR__."/../../"); +$dotenv->safeLoad(); + +//check if the current version of php is compatible +if(!Helper\CheckCompatibility::isCompatible()) +{ + echo "Flutterwave: This SDK only support php version ". Helper\CheckCompatibility::MINIMUM_COMPATIBILITY. " or greater."; + exit; +} + +// check for required key in SERVER super global +$flutterwaveKeys = ["SECRET_KEY","PUBLIC_KEY","ENV", "ENCRYPTION_KEY"]; +asort($flutterwaveKeys); + +try{ + foreach($flutterwaveKeys as $key) + { + if(!array_key_exists($key, $_SERVER)) + { + throw new InvalidArgumentException("$key environment variable missing."); + } + } +}catch(\Exception $e) +{ + echo "Flutterwave sdk: " .$e->getMessage().""; + + echo "
Kindly create a .env in the project root and add the required environment variables."; + exit; +} \ No newline at end of file diff --git a/src/AbstractPayment.php b/src/AbstractPayment.php new file mode 100644 index 0000000..032b4dc --- /dev/null +++ b/src/AbstractPayment.php @@ -0,0 +1,64 @@ +transactionPrefix = $overrideRefWithPrefix ? $prefix : self::$config::DEFAULT_PREFIX . '_'; + $this->baseUrl = self::$config::BASE_URL; + } + + abstract public function initialize(): void; +} diff --git a/src/Contract/ConfigInterface.php b/src/Contract/ConfigInterface.php new file mode 100644 index 0000000..0e4c2d2 --- /dev/null +++ b/src/Contract/ConfigInterface.php @@ -0,0 +1,29 @@ +data = [...$data]; + } + + public function get(string $param) + { + return $this->data[$param]; + } + + public function set(string $param, $value): void + { + $this->data[$param] = $value; + } + + public function has(string $param): bool + { + return isset($this->data[$param]); + } + + public function toArray(): array + { + return $this->data; + } +} diff --git a/src/Enum/Bill.php b/src/Enum/Bill.php new file mode 100644 index 0000000..fd5bab9 --- /dev/null +++ b/src/Enum/Bill.php @@ -0,0 +1,23 @@ +onFailure($transactionData); + } + } + + /** + * This is called only when a transaction failed + * */ + public function onFailure($transactionData): void + { + self::sendAnalytics('Initiate-Account-charge-error'); + // Get the transaction from your DB using the transaction reference (txref) + // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) + // You can also redirect to your failure page from here + } + + /** + * This is called when a transaction is requeryed from the payment gateway + * */ + public function onRequery($transactionReference): void + { + // Do something, anything! + } + + /** + * This is called a transaction requery returns with an error + * */ + public function onRequeryError($requeryResponse): void + { + // Do something, anything! + } + + /** + * This is called when a transaction is canceled by the user + * */ + public function onCancel($transactionReference): void + { + // Do something, anything! + // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution + } + + /** + * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. + * */ + public function onTimeout($transactionReference, $data): void + { + // Get the transaction from your DB using the transaction reference (txref) + // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. + // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects + } + + /** + * @throws \Exception + * */ + public function onAuthorization(\stdClass $response, ?array $resource = null): array + { + $mode = $response->meta->authorization->mode; + + if (property_exists($response, 'data')) { + $transactionId = $response->data->id; + $tx_ref = $response->data->tx_ref; + $data['data_to_save'] = [ + 'transactionId' => $transactionId, + 'tx_ref' => $tx_ref, + ]; + } + + switch ($mode) { + case 'pin': + $data['dev_instruction'] = "Redirect user to a form to enter his pin and re-initiate the charge adding the params ['pin' => 'USERS_PIN'] to the previous request."; + $data['instruction'] = 'Enter the pin of your card'; + break; + case 'redirect': + $data['dev_instruction'] = 'Redirect the user to the auth link for validation'; + $data['url'] = $response->meta->authorization->redirect; + break; + case 'avs': + throw new \Exception('AVS is currently not available via the SDK. please call the endpoint directly.'); + + case 'otp': + $data['dev_instruction'] = 'Redirect user to a form to validate with OTP code sent to their Phone.'; + + if (property_exists($response->data, 'processor_response')) { + $data['instruction'] = $response->data->processor_response; + } else { + $data['instruction'] = $response->meta->authorization->validate_instructions; + } + + $data['validate'] = true; + break; + } + + $data['mode'] = $mode; + + if (is_array($resource) && ! empty($resource)) { + $logger = $resource['logger']; + $logger->notice('Account Service::Authorization Mode: '.$mode); + } + + return $data; + } +} diff --git a/library/EventHandlers/AchEventHandler.php b/src/EventHandlers/AchEventHandler.php similarity index 50% rename from library/EventHandlers/AchEventHandler.php rename to src/EventHandlers/AchEventHandler.php index 823e568..a428dc8 100644 --- a/library/EventHandlers/AchEventHandler.php +++ b/src/EventHandlers/AchEventHandler.php @@ -1,5 +1,7 @@ onFailure($transactionData); } @@ -32,44 +36,94 @@ function onSuccessful($transactionData) { /** * This is called only when a transaction failed * */ - function onFailure($transactionData) { - self::sendAnalytics("Initiate-Ach-Payment-error"); + public function onFailure($transactionData): void + { + self::sendAnalytics('Initiate-Ach-Payment-error'); // Get the transaction from your DB using the transaction reference (txref) // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) // You can also redirect to your failure page from here - } /** * This is called when a transaction is requeryed from the payment gateway * */ - function onRequery($transactionReference) { + public function onRequery($transactionReference): void + { // Do something, anything! } /** * This is called a transaction requery returns with an error * */ - function onRequeryError($requeryResponse) { + public function onRequeryError($requeryResponse): void + { // Do something, anything! } /** * This is called when a transaction is canceled by the user * */ - function onCancel($transactionReference) { + public function onCancel($transactionReference): void + { // Do something, anything! // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - } /** * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. * */ - function onTimeout($transactionReference, $data) { + public function onTimeout($transactionReference, $data): void + { // Get the transaction from your DB using the transaction reference (txref) // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects + } + + public function onAuthorization(\stdClass $response, ?array $resource = null): array + { + $mode = $response->meta->authorization->mode; + + if (property_exists($response, 'data')) { + $transactionId = $response->data->id; + $tx_ref = $response->data->tx_ref; + $data['data_to_save'] = [ + 'transactionId' => $transactionId, + 'tx_ref' => $tx_ref, + ]; + } + + switch ($mode) { + case 'pin': + $data['dev_instruction'] = "Redirect user to a form to enter his pin and re-initiate the charge adding the params ['pin' => 'USERS_PIN'] to the previous request."; + $data['instruction'] = 'Enter the pin of your card'; + break; + case 'redirect': + $data['dev_instruction'] = 'Redirect the user to the auth link for validation'; + $data['url'] = $response->meta->authorization->redirect; + break; + case 'avs': + throw new \Exception('AVS is currently not available via the SDK. please call the endpoint directly.'); + + case 'otp': + $data['dev_instruction'] = 'Redirect user to a form to validate with OTP code sent to their Phone.'; + + if (property_exists($response->data, 'processor_response')) { + $data['instruction'] = $response->data->processor_response; + } else { + $data['instruction'] = $response->meta->authorization->validate_instructions; + } + + $data['validate'] = true; + break; + } + + $data['mode'] = $mode; + + if (is_array($resource) && ! empty($resource)) { + $logger = $resource['logger']; + $logger->notice('Ach Event::Authorization Mode: '.$mode); + } + return $data; } -} \ No newline at end of file +} diff --git a/src/EventHandlers/ApplePayEventHandler.php b/src/EventHandlers/ApplePayEventHandler.php new file mode 100644 index 0000000..6096a83 --- /dev/null +++ b/src/EventHandlers/ApplePayEventHandler.php @@ -0,0 +1,63 @@ +data->id; + $tx_ref = $response->data->tx_ref; + $data['data_to_save'] = [ + 'transactionId' => $transactionId, + 'tx_ref' => $tx_ref, + ]; + $data['mode'] = $response->data->meta->authorization->mode; + } + + $data['dev_instruction'] = 'Redirect the user to the auth link for validation. verfiy via the verify endpoint.'; + $data['url'] = $response->data->meta->authorization->redirect; + + if (is_array($resource) && ! empty($resource)) { + $logger = $resource['logger']; + $logger->notice('Apple Method Event::Apple Authorization Mode: '.$data['mode'] ?? 'redirect'); + } + + return $data; + } +} diff --git a/src/EventHandlers/BankTransferEventHandler.php b/src/EventHandlers/BankTransferEventHandler.php new file mode 100644 index 0000000..d69d149 --- /dev/null +++ b/src/EventHandlers/BankTransferEventHandler.php @@ -0,0 +1,85 @@ +meta->authorization; + $mode = $auth->mode; + $data['dev_instruction'] = 'Display the transfer data for the user to make a transfer to the generated account number. verify via Webhook Service.'; + $data['instruction'] = $auth->transfer_note; + $data['transfer_reference'] = $auth->transfer_reference; + $data['transfer_account'] = $auth->transfer_account; + $data['transfer_bank'] = $auth->transfer_bank; + $data['account_expiration'] = $auth->account_expiration; + $data['transfer_amount'] = $auth->transfer_amount; + $data['mode'] = $mode; + + if (is_array($resource) && ! empty($resource)) { + $logger = $resource['logger']; + $logger->notice('Transfer Authorization Mode: '.$mode); + $logger->info('Bank Transfer Event::Created Account Info :'.json_encode($data)); + } + + return $data; + } +} diff --git a/library/EventHandlers/BillEventHandler.php b/src/EventHandlers/BillEventHandler.php similarity index 80% rename from library/EventHandlers/BillEventHandler.php rename to src/EventHandlers/BillEventHandler.php index c300890..f5fbb8e 100644 --- a/library/EventHandlers/BillEventHandler.php +++ b/src/EventHandlers/BillEventHandler.php @@ -1,16 +1,18 @@ onFailure($transactionData); } @@ -32,46 +34,46 @@ function onSuccessful($transactionData) { /** * This is called only when a transaction failed * */ - function onFailure($transactionData) { - self::sendAnalytics("Bills-error"); + public function onFailure($transactionData): void + { + self::sendAnalytics('Bills-error'); // Get the transaction from your DB using the transaction reference (txref) // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) // You can also redirect to your failure page from here - } /** * This is called when a transaction is requeryed from the payment gateway * */ - function onRequery($transactionReference) { + public function onRequery($transactionReference): void + { // Do something, anything! } /** * This is called a transaction requery returns with an error * */ - function onRequeryError($requeryResponse) { + public function onRequeryError($requeryResponse): void + { // Do something, anything! } /** * This is called when a transaction is canceled by the user * */ - function onCancel($transactionReference) { + public function onCancel($transactionReference): void + { // Do something, anything! // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - } /** * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. * */ - function onTimeout($transactionReference, $data) { + public function onTimeout($transactionReference, $data): void + { // Get the transaction from your DB using the transaction reference (txref) // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects - } - - -} \ No newline at end of file +} diff --git a/library/EventHandlers/BvnEventHandler.php b/src/EventHandlers/BvnEventHandler.php similarity index 83% rename from library/EventHandlers/BvnEventHandler.php rename to src/EventHandlers/BvnEventHandler.php index 4d22934..2fe5105 100644 --- a/library/EventHandlers/BvnEventHandler.php +++ b/src/EventHandlers/BvnEventHandler.php @@ -1,16 +1,18 @@ onFailure($transactionData); + } + } + + /** + * This is called only when a transaction failed + * */ + public function onFailure($transactionData): void + { + self::sendAnalytics('Initiate-Card-Payments-error'); + // Get the transaction from your DB using the transaction reference (txref) + // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) + // You can also redirect to your failure page from here + } + + /** + * This is called when a transaction is requeryed from the payment gateway + * */ + public function onRequery($transactionReference): void + { + // Do something, anything! + } + + /** + * This is called a transaction requery returns with an error + * */ + public function onRequeryError($requeryResponse): void + { + // Do something, anything! + } + + /** + * This is called when a transaction is canceled by the user + * */ + public function onCancel($transactionReference): void + { + // Do something, anything! + // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution + } + + /** + * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. + * */ + public function onTimeout($transactionReference, $data): void + { + // Get the transaction from your DB using the transaction reference (txref) + // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. + // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects + } + + /** + * @throws \Exception + */ + public function onAuthorization(\stdClass $response, ?array $resource = null): array + { + $logger = null; + $data = []; + $mode = $response->meta->authorization->mode; + + if (property_exists($response, 'data')) { + $transactionId = $response->data->id; + $tx_ref = $response->data->tx_ref; + $data['data_to_save'] = [ + 'transactionId' => $transactionId, + 'tx_ref' => $tx_ref, + ]; + } + + switch ($mode) { + case AuthMode::PIN: + $data['dev_instruction'] = "Redirect user to a form to enter his pin and re-initiate the charge adding the params ['pin' => 'USERS_PIN'] to the payload."; + $data['instruction'] = 'Enter the pin of your card'; + break; + case AuthMode::REDIRECT: + $data['dev_instruction'] = 'Redirect the user to the auth link for validation'; + $data['url'] = $response->meta->authorization->redirect; + break; + case AuthMode::AVS: + $data['dev_instruction'] = "Redirect user to a form to enter certain details and re-initiate the charge adding the params ['mode' => 'avs_noauth', 'city' => 'USER_CITY', 'state' => 'USER_STATE', 'country' => 'USER_COUNTRY', 'zipcode' => 'USER_ZIP'] to the payload."; + $data['instruction'] = 'please complete the form for Address Verification.'; + break; + case AuthMode::OTP: + $data['dev_instruction'] = 'Redirect user to a form to validate with OTP code sent to their Phone.'; + $data['instruction'] = $response->data->processor_response; + $data['validate'] = true; + break; + } + + $data['mode'] = $mode; + + if (is_array($resource) && ! empty($resource)) { + $logger = $resource['logger']; + $logger->notice('Card Event::Authorization Mode: '.$mode); + } + + return $data; + } +} diff --git a/library/EventHandlers/EbillEventHandler.php b/src/EventHandlers/EbillEventHandler.php similarity index 85% rename from library/EventHandlers/EbillEventHandler.php rename to src/EventHandlers/EbillEventHandler.php index 158d7b8..38f423a 100644 --- a/library/EventHandlers/EbillEventHandler.php +++ b/src/EventHandlers/EbillEventHandler.php @@ -1,5 +1,7 @@ + * * @version 1.0 - **/ + */ -interface EventHandlerInterface{ +interface EventHandlerInterface +{ /** * This is called only when a transaction is successful + * * @param object $transactionData This is the transaction data as returned from the Rave payment gateway * */ - function onSuccessful($transactionData); + public function onSuccessful(object $transactionData): void; /** * This is called only when a transaction failed + * * @param object $transactionData This is the transaction data as returned from the Rave payment gateway * */ - function onFailure($transactionData); + public function onFailure(object $transactionData): void; /** * This is called when a transaction is requeryed from the payment gateway + * * @param string $transactionReference This is the transaction reference as returned from the Rave payment gateway * */ - function onRequery($transactionReference); + public function onRequery(string $transactionReference): void; /** * This is called a transaction requery returns with an error + * * @param string $requeryResponse This is the error response gotten from the Rave payment gateway requery call * */ - function onRequeryError($requeryResponse); + public function onRequeryError(string $requeryResponse): void; /** * This is called when a transaction is canceled by the user + * * @param string $transactionReference This is the transaction reference as returned from the Rave payment gateway * */ - function onCancel($transactionReference); + public function onCancel(string $transactionReference): void; /** * This is called when a transaction doesn't return with a success or a failure response. + * * @param string $transactionReference This is the transaction reference as returned from the Rave payment gateway + * * @data object $data This is the data returned from the requery call. * */ - function onTimeout($transactionReference,$data); - + public function onTimeout(string $transactionReference, $data): void; } diff --git a/src/EventHandlers/EventTracker.php b/src/EventHandlers/EventTracker.php new file mode 100644 index 0000000..d5b8c11 --- /dev/null +++ b/src/EventHandlers/EventTracker.php @@ -0,0 +1,51 @@ + getenv('PUBLIC_KEY'), + 'language' => 'PHP V3', + 'version' => '1.0.0', + 'title' => $title, + 'message' => self::$response_time, + ]; + $body = Body::json($data); + Request::post($url, [], $body); + + self::resetTime(); + } + + private static function resetTime(): void + { + self::$time_start = 0; + self::$response_time = 0; + } +} diff --git a/library/EventHandlers/MomoEventHandler.php b/src/EventHandlers/MomoEventHandler.php similarity index 54% rename from library/EventHandlers/MomoEventHandler.php rename to src/EventHandlers/MomoEventHandler.php index a45c267..37991ed 100644 --- a/library/EventHandlers/MomoEventHandler.php +++ b/src/EventHandlers/MomoEventHandler.php @@ -1,16 +1,22 @@ onFailure($transactionData); } @@ -32,44 +38,81 @@ function onSuccessful($transactionData) { /** * This is called only when a transaction failed * */ - function onFailure($transactionData) { - self::sendAnalytics("Initiate-Mobile-Money-error"); + public function onFailure($transactionData): void + { + self::sendAnalytics('Initiate-Mobile-Money-error'); // Get the transaction from your DB using the transaction reference (txref) // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) // You can also redirect to your failure page from here - } /** * This is called when a transaction is requeryed from the payment gateway * */ - function onRequery($transactionReference) { + public function onRequery($transactionReference): void + { // Do something, anything! } /** * This is called a transaction requery returns with an error * */ - function onRequeryError($requeryResponse) { + public function onRequeryError($requeryResponse): void + { // Do something, anything! } /** * This is called when a transaction is canceled by the user * */ - function onCancel($transactionReference) { + public function onCancel($transactionReference): void + { // Do something, anything! // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - } /** * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. * */ - function onTimeout($transactionReference, $data) { + public function onTimeout($transactionReference, $data): void + { // Get the transaction from your DB using the transaction reference (txref) // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects + } + + public function onAuthorization(\stdClass $response, ?array $resource = null): array + { + if (property_exists($response, 'data')) { + $transactionId = $response->data->id; + $tx_ref = $response->data->tx_ref; + $data['data_to_save'] = [ + 'transactionId' => $transactionId, + 'tx_ref' => $tx_ref, + ]; + } + + if (property_exists($response, 'meta')) { + $mode = $response->meta->authorization->mode; + switch ($mode) { + case AuthMode::REDIRECT: + $data['dev_instruction'] = 'Redirect the user to the auth link for validation'; + $data['url'] = $response->meta->authorization->redirect; + break; + case AuthMode::CALLBACK: + $data['dev_instruction'] = "The customer needs to authorize with their mobile money service, and then we'll send you a webhook."; + $data['instruction'] = 'please kindly authorize with your mobile money service'; + break; + } + } + + $data['mode'] = $mode ?? null; + + if (is_array($resource) && ! empty($resource)) { + $logger = $resource['logger']; + $logger->notice('Momo Service::Authorization Mode: '.($mode ?? 'none')); + } + return $data; } -} \ No newline at end of file +} diff --git a/library/EventHandlers/MpesaEventHandler.php b/src/EventHandlers/MpesaEventHandler.php similarity index 79% rename from library/EventHandlers/MpesaEventHandler.php rename to src/EventHandlers/MpesaEventHandler.php index efeef8b..230f504 100644 --- a/library/EventHandlers/MpesaEventHandler.php +++ b/src/EventHandlers/MpesaEventHandler.php @@ -1,5 +1,7 @@ onFailure($transactionData); - } } /** * This is called only when a transaction failed * */ - function onFailure($transactionData) { - self::sendAnalytics("Initiate-Mpesa-error"); + public function onFailure($transactionData): void + { + self::sendAnalytics('Initiate-Mpesa-error'); // Get the transaction from your DB using the transaction reference (txref) // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) // You can also redirect to your failure page from here - } /** * This is called when a transaction is requeryed from the payment gateway * */ - function onRequery($transactionReference) { + public function onRequery($transactionReference): void + { // Do something, anything! } /** * This is called a transaction requery returns with an error * */ - function onRequeryError($requeryResponse) { + public function onRequeryError($requeryResponse): void + { // Do something, anything! } /** * This is called when a transaction is canceled by the user * */ - function onCancel($transactionReference) { + public function onCancel($transactionReference): void + { // Do something, anything! // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - } /** * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. * */ - function onTimeout($transactionReference, $data) { + public function onTimeout($transactionReference, $data): void + { // Get the transaction from your DB using the transaction reference (txref) // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects - } -} \ No newline at end of file +} diff --git a/library/EventHandlers/PaymentPlanEventHandler.php b/src/EventHandlers/PaymentPlanEventHandler.php similarity index 82% rename from library/EventHandlers/PaymentPlanEventHandler.php rename to src/EventHandlers/PaymentPlanEventHandler.php index d548764..eed7e55 100644 --- a/library/EventHandlers/PaymentPlanEventHandler.php +++ b/src/EventHandlers/PaymentPlanEventHandler.php @@ -1,5 +1,7 @@ onFailure($transactionData); } @@ -31,44 +34,46 @@ function onSuccessful($transactionData) { /** * This is called only when a transaction failed * */ - function onFailure($transactionData) { - self::sendAnalytics("Initiate-Tokenized-charge-error"); + public function onFailure($transactionData): void + { + self::sendAnalytics('Initiate-Tokenized-charge-error'); // Get the transaction from your DB using the transaction reference (txref) // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) // You can also redirect to your failure page from here - } /** * This is called when a transaction is requeryed from the payment gateway * */ - function onRequery($transactionReference) { + public function onRequery($transactionReference): void + { // Do something, anything! } /** * This is called a transaction requery returns with an error * */ - function onRequeryError($requeryResponse) { + public function onRequeryError($requeryResponse): void + { // Do something, anything! } /** * This is called when a transaction is canceled by the user * */ - function onCancel($transactionReference) { + public function onCancel($transactionReference): void + { // Do something, anything! // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - } /** * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. * */ - function onTimeout($transactionReference, $data) { + public function onTimeout($transactionReference, $data): void + { // Get the transaction from your DB using the transaction reference (txref) // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects - } -} \ No newline at end of file +} diff --git a/library/EventHandlers/TransactionVerificationEventHandler.php b/src/EventHandlers/TransactionVerificationEventHandler.php similarity index 83% rename from library/EventHandlers/TransactionVerificationEventHandler.php rename to src/EventHandlers/TransactionVerificationEventHandler.php index cdb72a7..5e4cf9c 100644 --- a/library/EventHandlers/TransactionVerificationEventHandler.php +++ b/src/EventHandlers/TransactionVerificationEventHandler.php @@ -1,5 +1,7 @@ meta->authorization; +// $mode = $auth->mode; +// $data['dev_instruction'] = "Display the transfer data for the user to make a transfer to the generated account number. verify via Webhook Service."; +// $data['instruction'] = $auth->transfer_note; +// $data['transfer_reference'] = $auth->transfer_reference; +// $data['transfer_account'] = $auth->transfer_account; +// $data['transfer_bank'] = $auth->transfer_bank; +// $data['account_expiration'] = $auth->account_expiration; +// $data['transfer_amount'] = $auth->transfer_amount; +// $data['mode'] = $mode; +// +// if(is_array($resource) && !empty($resource)) +// { +// $logger = $resource['logger']; +// $logger->notice("Transfer Authorization Mode: ".$mode); +// } + return []; } -} \ No newline at end of file +} diff --git a/library/EventHandlers/UssdEventHandler.php b/src/EventHandlers/UssdEventHandler.php similarity index 61% rename from library/EventHandlers/UssdEventHandler.php rename to src/EventHandlers/UssdEventHandler.php index ca77308..610c8b1 100644 --- a/library/EventHandlers/UssdEventHandler.php +++ b/src/EventHandlers/UssdEventHandler.php @@ -1,5 +1,7 @@ data->id; + $tx_ref = $response->data->tx_ref; + $flw_ref = $response->data->flw_ref; + + $data = [ + 'transactionId' => $transactionId, + 'tx_ref' => $tx_ref, + 'flw_ref' => $flw_ref, + 'code' => $response->data->payment_code, + ]; + } + + $data['instruction'] = $response->meta->authorization->note; + + $data['mode'] = $response->meta->authorization->mode; + + if (is_array($resource) && ! empty($resource)) { + $logger = $resource['logger']; + $logger->notice('Ussd Authorization Mode: '.$data['mode']); + } + return $data; } -} \ No newline at end of file +} diff --git a/library/EventHandlers/VirtualAccountEventHandler.php b/src/EventHandlers/VirtualAccountEventHandler.php similarity index 83% rename from library/EventHandlers/VirtualAccountEventHandler.php rename to src/EventHandlers/VirtualAccountEventHandler.php index 41ee5dc..eeb4269 100644 --- a/library/EventHandlers/VirtualAccountEventHandler.php +++ b/src/EventHandlers/VirtualAccountEventHandler.php @@ -1,5 +1,7 @@ onFailure($transactionData); } @@ -32,44 +36,46 @@ function onSuccessful($transactionData) { /** * This is called only when a transaction failed * */ - function onFailure($transactionData) { + public function onFailure($transactionData): void + { // Get the transaction from your DB using the transaction reference (txref) // Update the db transaction record (includeing parameters that didn't exist before the transaction is completed. for audit purpose) // You can also redirect to your failure page from here - self::sendAnalytics("Initiate-Voucher-Payment-error"); - + self::sendAnalytics('Initiate-Voucher-Payment-error'); } /** * This is called when a transaction is requeryed from the payment gateway * */ - function onRequery($transactionReference) { + public function onRequery($transactionReference): void + { // Do something, anything! } /** * This is called a transaction requery returns with an error * */ - function onRequeryError($requeryResponse) { + public function onRequeryError($requeryResponse): void + { // Do something, anything! } /** * This is called when a transaction is canceled by the user * */ - function onCancel($transactionReference) { + public function onCancel($transactionReference): void + { // Do something, anything! // Note: Somethings a payment can be successful, before a user clicks the cancel button so proceed with caution - } /** * This is called when a transaction doesn't return with a success or a failure response. This can be a timedout transaction on the Rave server or an abandoned transaction by the customer. * */ - function onTimeout($transactionReference, $data) { + public function onTimeout($transactionReference, $data): void + { // Get the transaction from your DB using the transaction reference (txref) // Queue it for requery. Preferably using a queue system. The requery should be about 15 minutes after. // Ask the customer to contact your support and you should escalate this issue to the flutterwave support team. Send this as an email and as a notification on the page. just incase the page timesout or disconnects - } -} \ No newline at end of file +} diff --git a/src/Exception/ApiException.php b/src/Exception/ApiException.php new file mode 100644 index 0000000..370151d --- /dev/null +++ b/src/Exception/ApiException.php @@ -0,0 +1,9 @@ + + * + * @version 1.0 + */ +class Flutterwave extends AbstractPayment +{ + use Configure,PaymentFactory; + + /** + * Flutterwave Construct + * @param string $prefix + * @param bool $overrideRefWithPrefix Set this parameter to true to use your prefix as the transaction reference + */ + public function __construct(string $prefix, bool $overrideRefWithPrefix = false) + { + parent::__construct($prefix, $overrideRefWithPrefix); + $this->overrideTransactionReference = $overrideRefWithPrefix; + // create a log channel + $this->logger = self::$config->getLoggerInstance(); + $this->createReferenceNumber(); + $this->logger->notice('Main Class Initializes....'); + } + + /** + * Sets the transaction amount + * @param string $amount Transaction amount + * */ + public function setAmount(string $amount): object + { + $this->amount = $amount; + return $this; + } + + /** + * Sets the allowed payment methods + * + * @param string $paymentOptions The allowed payment methods. Can be card, account or both + */ + public function setPaymentOptions(string $paymentOptions): object + { + $this->paymentOptions = $paymentOptions; + return $this; + } + + /** + * Sets the transaction description + * + * @param string $customDescription The description of the transaction + */ + public function setDescription(string $customDescription): object + { + $this->customDescription = $customDescription; + return $this; + } + + /** + * Sets the payment page logo + * + * @param string $customLogo Your Logo + */ + public function setLogo(string $customLogo): object + { + $this->customLogo = $customLogo; + return $this; + } + + /** + * Sets the payment page title + * + * @param string $customTitle A title for the payment. It can be the product name, your business name or anything short and descriptive + */ + public function setTitle(string $customTitle): object + { + $this->customTitle = $customTitle; + return $this; + } + + /** + * Sets transaction country + * + * @param string $country The transaction country. Can be NG, US, KE, GH and ZA + */ + public function setCountry(string $country): object + { + $this->country = $country; + return $this; + } + + /** + * Sets the transaction currency + * + * @param string $currency The transaction currency. Can be NGN, GHS, KES, ZAR, USD, EUR and GBP + */ + public function setCurrency(string $currency): object + { + $this->currency = $currency; + return $this; + } + + /** + * Sets the customer email + * + * @param string $customerEmail This is the paying customer's email + */ + public function setEmail(string $customerEmail): object + { + $this->customerEmail = $customerEmail; + return $this; + } + + /** + * Sets the customer firstname + * + * @param string $customerFirstname This is the paying customer's firstname + */ + public function setFirstname(string $customerFirstname): object + { + $this->customerFirstname = $customerFirstname; + return $this; + } + + /** + * Sets the customer lastname + * + * @param string $customerLastname This is the paying customer's lastname + */ + public function setLastname(string $customerLastname): object + { + $this->customerLastname = $customerLastname; + return $this; + } + + /** + * Sets the customer phonenumber + * + * @param string $customerPhone This is the paying customer's phonenumber + */ + public function setPhoneNumber(string $customerPhone): object + { + $this->customerPhone = $customerPhone; + return $this; + } + + /** + * Sets the payment page button text + * + * @param string $payButtonText This is the text that should appear on the payment button on the Rave payment gateway. + */ + public function setPayButtonText(string $payButtonText): object + { + $this->payButtonText = $payButtonText; + return $this; + } + + /** + * Sets the transaction redirect url + * + * @param string $redirectUrl This is where the Rave payment gateway will redirect to after completing a payment + */ + public function setRedirectUrl(string $redirectUrl): object + { + $this->redirectUrl = $redirectUrl; + return $this; + } + + /** + * Sets the transaction meta data. Can be called multiple time to set multiple meta data + * + * @param array $meta This are the other information you will like to store with the transaction. It is a key => value array. eg. PNR for airlines, product colour or attributes. Example. array('name' => 'femi') + */ + public function setMetaData(array $meta): object + { + $this->meta = [$this->meta, $meta]; + return $this; + } + + /** + * Sets the event hooks for all available triggers + * + * @param EventHandlerInterface $handler This is a class that implements the Event Handler Interface + */ + public function eventHandler(EventHandlerInterface $handler): object + { + $this->handler = $handler; + return $this; + } + + /** + * Requerys a previous transaction from the Rave payment gateway + * + * @param string $referenceNumber This should be the reference number of the transaction you want to requery + */ + public function requeryTransaction(string $referenceNumber): object + { + $this->txref = $referenceNumber; + $this->requeryCount++; + $this->logger->notice('Requerying Transaction....' . $this->txref); + if (isset($this->handler)) { + $this->handler->onRequery($this->txref); + } + + $data = [ + 'id' => (int) $referenceNumber, + // 'only_successful' => '1' + ]; + + // make request to endpoint using unirest. + $headers = ['Content-Type' => 'application/json', 'Authorization' => 'Bearer '.self::$config->getSecretKey()]; + $body = Body::json($data); + $url = $this->baseUrl . '/transactions/' . $data['id'] . '/verify'; + // Make `POST` request and handle response with unirest + $response = Request::get($url, $headers); + +// print_r($response); + + //check the status is success + if ($response->body && $response->body->status === 'success') { + if ($response->body && $response->body->data && $response->body->data->status === 'successful') { + $this->logger->notice('Requeryed a successful transaction....' . json_encode($response->body->data)); + // Handle successful + if (isset($this->handler)) { + $this->handler->onSuccessful($response->body->data); + } + } elseif ($response->body && $response->body->data && $response->body->data->status === 'failed') { + // Handle Failure + $this->logger->warning('Requeryed a failed transaction....' . json_encode($response->body->data)); + if (isset($this->handler)) { + $this->handler->onFailure($response->body->data); + } + } else { + // Handled an undecisive transaction. Probably timed out. + $this->logger->warning('Requeryed an undecisive transaction....' . json_encode($response->body->data)); + // I will requery again here. Just incase we have some devs that cannot setup a queue for requery. I don't like this. + if ($this->requeryCount > 4) { + // Now you have to setup a queue by force. We couldn't get a status in 5 requeries. + if (isset($this->handler)) { + $this->handler->onTimeout($this->txref, $response->body); + } + } else { + $this->logger->notice('delaying next requery for 3 seconds'); + sleep(3); + $this->logger->notice('Now retrying requery...'); + $this->requeryTransaction($this->txref); + } + } + } else { + // $this->logger->warn('Requery call returned error for transaction reference.....'.json_encode($response->body).'Transaction Reference: '. $this->txref); + // Handle Requery Error + if (isset($this->handler)) { + $this->handler->onRequeryError($response->body); + } + } + return $this; + } + + /** + * Generates the final json to be used in configuring the payment call to the rave payment gateway + */ + public function initialize(): void + { + $this->createCheckSum(); + + $this->logger->info('Rendering Payment Modal..'); + + echo ''; + echo ''; +// $loader_img_src = FLW_PHP_ASSET_DIR."js/v3.js"; + echo '
Proccessing...loading-gif
'; +// $script_src = FLW_PHP_ASSET_DIR."js/v3.js"; + echo ''; + + echo ''; + echo ''; + echo ''; + $this->logger->info('Rendered Payment Modal Successfully..'); + } + + /** + * Handle canceled payments with this method + * + * @param string $referenceNumber This should be the reference number of the transaction that was canceled + */ + public function paymentCanceled(string $referenceNumber): object + { + $this->logger->notice('Payment was canceled by user..' . $referenceNumber); + if (isset($this->handler)) { + $this->handler->onCancel($referenceNumber); + } + return $this; + } +} diff --git a/src/Helper/Base.php b/src/Helper/Base.php new file mode 100644 index 0000000..ce4589a --- /dev/null +++ b/src/Helper/Base.php @@ -0,0 +1,26 @@ +secret = $secretKey; + $this->public = $publicKey; + $this->enc = $encryptKey; + $this->env = $env; + + $this->http = new Client([ + 'base_uri' => $this->getBaseUrl(), + 'timeout' => 60, + ]); + + $log = new Logger('Flutterwave/PHP'); + $this->logger = $log; + $log->pushHandler(new RotatingFileHandler(self::LOG_FILE_NAME, 90)); + } + + public static function setUp(string $secretKey, string $publicKey, string $enc, string $env): ConfigInterface + { + if (is_null(self::$instance)) { + return new Config($secretKey, $publicKey, $enc, $env); + } + return self::$instance; + } + + public function getHttp(): ClientInterface + { + return $this->http ?? new Client(); + } + + public function getLoggerInstance(): LoggerInterface + { + return $this->logger; + } + + public function getEncryptkey(): string + { + return $this->enc; + } + + public function getPublicKey(): string + { + return $this->public; + } + + public static function getBaseUrl(): string + { + return self::BASE_URL; + } + + public function getSecretKey(): string + { + return $this->secret; + } + + public function getEnv(): string + { + return $this->env; + } + + public static function getDefaultTransactionPrefix(): string + { + return self::DEFAULT_PREFIX; + } +} diff --git a/src/Payload.php b/src/Payload.php new file mode 100644 index 0000000..01e65de --- /dev/null +++ b/src/Payload.php @@ -0,0 +1,144 @@ +has($param)) { + return null; + } + return $this->data[$param]; + } + + public function set(string $param, $value): void + { + if ($param === AuthMode::PIN) { + $this->data['otherData']['authorization']['mode'] = self::PIN; + $this->data['otherData']['authorization'][AuthMode::PIN] = $value; + } else { + $this->data[$param] = $value; + } + } + + public function delete(string $param, array $assoc_option = []): void + { + if (! isset($param)) { + return; + } + + if ($param === 'otherData' && count($assoc_option) > 0) { + foreach ($assoc_option as $option) { + unset($this->data['otherData'][$option]); + } + } + unset($this->data[$param]); + } + + public function setPayloadType(string $type): self + { + $this->type = $type; + return $this; + } + + public function toArray(?string $payment_method = null): array + { + $data = $this->data; + $customer = $data['customer'] ?? new Customer(); + $additionalData = $data['otherData'] ?? []; + + if (gettype($customer) === 'string') { + $string_value = $customer; + $customer = new Customer(); + $customer->set('customer', $string_value); + } + + switch ($payment_method) { + case 'card': + $card_details = $additionalData['card_details']; + unset($additionalData['card_details']); + $data = array_merge($data, $additionalData, $customer->toArray(), $card_details); + break; + case 'account': + $account_details = $additionalData['account_details']; + unset($additionalData['account_details']); + $data = array_merge($data, $additionalData, $customer->toArray(), $account_details); + break; + default: + $data = array_merge($data, $additionalData, $customer->toArray()); + break; + } + + unset($data['customer']); + unset($data['otherData']); + + //convert customer obj to array + $data = array_merge($additionalData, $data, $customer->toArray()); + + //if $data['preauthorize'] is false unset + if (isset($data['preauthorize']) && empty($data['preauthorize'])) { + unset($data['preauthorize']); + } + + if (array_key_exists('phone_number', $data) && is_null($data['phone_number'])) { + unset($data['phone_number']); + } + + //if $data['payment_plan'] is null unset + if (isset($data['payment_plan']) && empty($data['payment_plan'])) { + unset($data['payment_plan']); + } + return $data; + } + + public function update($param, $value): void + { + if ($param === 'otherData' && \is_array($value)) { + foreach ($value as $key => $item) { + $this->data['otherData'][$key] = $item; + } + } + + $this->data = array_merge($this->data, [$param => $value]); + } + + public function empty(): void + { + $this->data = []; + } + + public function has(string $param): bool + { + if (! isset($this->data[$param])) { + return false; + } + return true; + } + + public function size(): int + { + return count($this->data); + } + + public function generateTxRef(): void + { + if ($this->has('tx_ref')) { + $this->set('tx_ref', 'FLWPHP|' . (mt_rand(2, 101) + time())); + } + } +} diff --git a/src/Service/AccountPayment.php b/src/Service/AccountPayment.php new file mode 100644 index 0000000..ef7c605 --- /dev/null +++ b/src/Service/AccountPayment.php @@ -0,0 +1,138 @@ + self::DEBIT_NG, + 'UK' => self::DEBIT_UK, + ]; + protected string $country = 'NG'; + private AccountEventHandler $eventHandler; + + public function __construct(?ConfigInterface $config = null) + { + parent::__construct($config); + + $endpoint = $this->getEndpoint(); + + $this->url = $this->baseUrl.'/'.$endpoint.'?type='; + $this->eventHandler = new AccountEventHandler(); + } + + public function setCountry(string $country): void + { + if ($this->country !== $country) { + $this->country = $country; + } + } + + /** + * @return array + * + * @throws Exception + * @throws GuzzleException + */ + public function initiate(Payload $payload): array + { + if ($this->checkPayloadIsValid($payload, 'account_details')) { + return $this->charge($payload); + } + $msg = 'Account Service:Please pass account details.'; + $this->logger->info($msg); + throw new InvalidArgumentException($msg); + } + + /** + * @return array + * + * @throws GuzzleException + * @throws Exception + */ + public function charge(Payload $payload): array + { + $this->logger->notice('Account Service::Charging Account ...'); + + $this->checkSpecialCasesParams($payload); + $payload = $payload->toArray(self::TYPE); + + //request payload + $body = $payload; + + //check which country was passed. + $account = $this->accounts[$payload['country']]; + + unset($body['country']); + unset($body['address']); + + AccountEventHandler::startRecording(); + $request = $this->request($body, 'POST', $account); + AccountEventHandler::setResponseTime(); + return $this->handleAuthState($request, $body); + } + + public function save(callable $callback): void + { + call_user_func_array($callback, []); + } + + private function checkSpecialCasesParams(Payload $payload) + { + $details = $payload->get('otherData')['account_details']; + $banks = require __DIR__ . '/../Util/unique_bank_cases.php'; + + foreach ($banks as $code => $case) { + if ($details['account_bank'] === $code) { + $key = array_keys($case['requiredParams'])[0]; //assuming required param is one + + if (! isset($details[$key])) { + $this->logger->notice("Account Service:: {$key} is required for the request"); + throw new InvalidArgumentException("{$key} is required for the request"); + } + + if ($key === 'bvn') { + $bvn = $details[$key]; + $pattern = '/([0-9]){11}/'; + return preg_match_all($pattern, $bvn); + } + + if ($key === 'passcode') { + $passcode = $details[$key]; + $pattern = '/([0-9]){8}/'; + return preg_match_all($pattern, $passcode); + } + } + } + return true; + } + + /** + * @param array $payload + * + * @return array + * + * @throws Exception + */ + private function handleAuthState(stdClass $response, array $payload): array + { + return $this->eventHandler->onAuthorization($response, ['logger' => $this->logger]); + } +} diff --git a/src/Service/AchPayment.php b/src/Service/AchPayment.php new file mode 100644 index 0000000..75e4816 --- /dev/null +++ b/src/Service/AchPayment.php @@ -0,0 +1,97 @@ + 'US', + self::ZAR => 'ZA', + ]; + private AchEventHandler $eventHandler; + + public function __construct(?ConfigInterface $config = null) + { + parent::__construct($config); + + $endpoint = $this->getEndpoint(); + $this->url = $this->baseUrl.'/'.$endpoint.'?type='; + $this->eventHandler = new AchEventHandler(); + } + + public function setCountry(string $country): void + { + if ($this->country !== $country) { + $this->country = $country; + } + } + + /** + * @return array + * + * @throws GuzzleException + */ + public function initiate(Payload $payload): array + { + return $this->charge($payload); + } + + /** + * @return array + * + * @throws GuzzleException + * @throws Exception + */ + public function charge(Payload $payload): array + { + $this->logger->notice(' Ach Service::Started Charging Account ...'); + + $currency = $payload->get('currency'); + + $this->setCountry($this->currency[$currency]); + + $payload->set('country', $this->country); + + $payload = $payload->toArray(); + + //request payload + $body = $payload; + + unset($body['address']); + + AchEventHandler::startRecording(); + $request = $this->request($body, 'POST', self::TYPE); + AchEventHandler::setResponseTime(); + return $this->handleAuthState($request, $body); + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + /** + * @throws Exception + */ + private function handleAuthState(stdClass $response, array $payload): array + { + return $this->eventHandler->onAuthorization($response, ['logger' => $this->logger]); + } +} diff --git a/src/Service/ApplePay.php b/src/Service/ApplePay.php new file mode 100644 index 0000000..5ab7812 --- /dev/null +++ b/src/Service/ApplePay.php @@ -0,0 +1,78 @@ +getEndpoint(); + $this->url = $this->baseUrl.'/'.$endpoint.'?type='; + $this->eventHandler = new ApplePayEventHandler(); + } + + /** + * @return array + * + * @throws GuzzleException + */ + public function initiate(Payload $payload): array + { + return $this->charge($payload); + } + + /** + * @return array + * + * @throws GuzzleException + */ + public function charge(Payload $payload): array + { + $this->logger->notice('Apple Service::Started Charging Process ...'); + + $payload = $payload->toArray(); + + //request payload + $body = $payload; + + unset($body['country']); + unset($body['address']); + + ApplePayEventHandler::startRecording(); + $request = $this->request($body, 'POST', self::TYPE); + ApplePayEventHandler::setResponseTime(); + return $this->handleAuthState($request, $body); + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + /** + * @param array $payload + * + * @return array + */ + private function handleAuthState(stdClass $response, array $payload): array + { + return $this->eventHandler->onAuthorization($response, ['logger' => $this->logger]); + } +} diff --git a/src/Service/BankTransfer.php b/src/Service/BankTransfer.php new file mode 100644 index 0000000..b150213 --- /dev/null +++ b/src/Service/BankTransfer.php @@ -0,0 +1,89 @@ +getEndpoint(); + $this->url = $this->baseUrl.'/'.$endpoint.'?type='; + $this->eventHandler = new BankTransferEventHandler(); + } + + public function makePermanent(): void + { + if (! $this->isPermanent) { + $this->isPermanent = true; + } + } + + /** + * @param Payload $payload + * @return array + * + * @throws GuzzleException + */ + public function initiate(Payload $payload): array + { + return $this->charge($payload); + } + + /** + * @param Payload $payload + * @return array + * + * @throws GuzzleException + * @throws Exception + */ + public function charge(Payload $payload): array + { + $this->logger->notice('Bank Transfer Service::Generating Account for Customer Transfer ...'); + + $payload->set('is_permanent', (int) $this->isPermanent); + $payload = $payload->toArray(); + + //request payload + $body = $payload; + + BankTransferEventHandler::startRecording(); + $request = $this->request($body, 'POST', self::TYPE); + BankTransferEventHandler::setResponseTime(); + return $this->handleAuthState($request, $body); + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + /** + * @param stdClass $response + * @param array $payload + * @return array + * @throws Exception + */ + private function handleAuthState(stdClass $response, array $payload): array + { + return $this->eventHandler->onAuthorization($response, ['logger' => $this->logger]); + } +} diff --git a/src/Service/Banks.php b/src/Service/Banks.php new file mode 100644 index 0000000..132f180 --- /dev/null +++ b/src/Service/Banks.php @@ -0,0 +1,43 @@ +logger->notice("Bank Service::Retrieving banks in country:({$country})."); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."/{$country}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws GuzzleException + */ + public function getBranches(string $id): \stdClass + { + $this->logger->notice("Bank Service::Retrieving Bank Branches bank_id:({$id})."); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."/{$id}/branches"); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/Beneficiaries.php b/src/Service/Beneficiaries.php new file mode 100644 index 0000000..d4c5f04 --- /dev/null +++ b/src/Service/Beneficiaries.php @@ -0,0 +1,90 @@ +toArray(); + + if (array_key_exists('customer', $payload)) { + $this->logger->error('Beneficiaries Service::The required parameter customer Object is not present in payload'); + throw new InvalidArgumentException('Beneficiaries Service:The required parameter Object is not present in payload'); + } + + foreach ($this->requiredParams as $param) { + if (! array_key_exists($param, $payload)) { + $this->logger->error("Beneficiaries Service::The required parameter {$param} is not present in payload"); + throw new InvalidArgumentException("Beneficiaries Service:The required parameter {$param} is not present in payload"); + } + } + + $body = $payload; + + $this->logger->notice('Beneficiaries Service::Creating a Beneficiary.'); + self::startRecording(); + $response = $this->request($body, 'POST', $this->name); + $this->logger->notice('Beneficiaries Service::Created a Beneficiary Successfully.'); + self::setResponseTime(); + return $response; + } + + /** + * @throws GuzzleException + */ + public function list(): stdClass + { + $this->logger->notice('Beneficiaries Service::Retrieving all Beneficiaries.'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name); + self::setResponseTime(); + return $response; + } + + /** + * @throws GuzzleException + */ + public function get(string $id): stdClass + { + $this->logger->notice('Beneficiaries Service::Retrieving a Beneficiary.'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."/{$id}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws GuzzleException + */ + public function delete(string $id): stdClass + { + $this->logger->notice('Beneficiaries Service::Delete a Beneficiary.'); + self::startRecording(); + $response = $this->request(null, 'DELETE', $this->name."/{$id}"); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/Bill.php b/src/Service/Bill.php new file mode 100644 index 0000000..dcc177e --- /dev/null +++ b/src/Service/Bill.php @@ -0,0 +1,112 @@ +categories = require __DIR__ . '/../Util/bill_categories.php'; + } + + /** + * @throws Exception + */ + public function getCategories(): \stdClass + { + $this->logger->notice('Bill Payment Service::Retrieving all Categories.'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function validateService(string $item_code): \stdClass + { + $this->logger->notice('Bill Payment Service::Retrieving all Plans.'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."bill-item/{$item_code}/validate"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function createPayment(\Flutterwave\Payload $payload): \stdClass + { + $payload = + $payload = $payload->toArray(); + foreach ($this->requiredParams as $param) { + if (! array_key_exists($param, $payload)) { + $this->logger->error("Bill Payment Service::The required parameter {$param} is not present in payload"); + throw new \InvalidArgumentException("Bill Payment Service:The required parameter {$param} is not present in payload"); + } + } + + $body = $payload; + + $this->logger->notice('Bill Payment Service::Creating a Bill Payment.'); + self::startRecording(); + $response = $this->request($body, 'POST', 'bills'); + $this->logger->notice('Bill Payment Service::Created a Bill Payment Successfully.'); + self::setResponseTime(); + return $response; + } + + public function createBulkPayment(array $bulkPayload): \stdClass + { + if (empty($bulkPayload)) { + $this->logger->error('Bill Payment Service::Bulk Payload is empty. Pass a filled array'); + throw new \InvalidArgumentException('Bill Payment Service::Bulk Payload is currently empty. Pass a filled array'); + } + + $body = $bulkPayload; + $this->logger->notice('Bill Payment Service::Creating a Bulk Bill Payment.'); + self::startRecording(); + $response = $this->request($body, 'POST', $this->name); + $this->logger->notice('Bill Payment Service::Created a Bulk Bill Payment Successfully.'); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getBillStatus(string $reference): \stdClass + { + $this->logger->notice('Bill Payment Service::Retrieving Bill Payment Status'); + self::startRecording(); + $response = $this->request(null, 'GET', "bills/{$reference}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getBillPayments(): \stdClass + { + $this->logger->notice('Bill Payment Service::Retrieving Bill Payment'); + self::startRecording(); + $response = $this->request(null, 'GET', 'bills'); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/CardPayment.php b/src/Service/CardPayment.php new file mode 100644 index 0000000..f6eb668 --- /dev/null +++ b/src/Service/CardPayment.php @@ -0,0 +1,139 @@ +getEndpoint(); + + $this->url = $this->baseUrl.'/'.$endpoint.'?type='.self::TYPE; + $this->end_point = self::ENDPOINT.'?type='.self::TYPE; + $this->eventHandler = new CardEventHandler(); + } + + /** + * @param Payload $payload + * @return array + * @throws GuzzleException + */ + public function initiate(\Flutterwave\Payload $payload): array + { + if (self::$count >= 2) { + //TODO: if payload does not have pin on 2nd request, trigger a warning. + } + $this->logger->notice('Card Service::Initiating Card Payment...'); + + if ($this->checkPayloadIsValid($payload, 'card_details')) { + self::$count++; + $this->logger->notice('Card Service::Payload Confirmed...'); + return $this->charge($payload); + } + $msg = 'Card Service:Please pass card details.'; + $this->logger->info($msg); + throw new InvalidArgumentException($msg); + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + /** + * @return array + * + * @throws GuzzleException + */ + public function charge(\Flutterwave\Payload $payload): array + { + $tx_ref = $payload->get('tx_ref'); + $this->logger->notice("Card Service::Started Charging Card tx_ref:({$tx_ref})..."); + + //required data + $url = $this->url; + $secret = $this->config->getSecretKey(); + $payload = $payload->toArray(self::TYPE); + //request payload + $client = $this->encryption( + json_encode($payload) + ); + + $body = [ + 'client' => $client, + ]; + + CardEventHandler::startRecording(); + $request = $this->request($body, 'POST'); + CardEventHandler::setResponseTime(); + return $this->handleAuthState($request, $payload); + } + + /** + * this is the encrypt3Des function that generates an encryption Key for you by passing your transaction Util and Secret Key as a parameter. + * @param string $data + * @param $key + * @return string + */ + + public function encrypt3Des(string $data, $key): string + { + $encData = openssl_encrypt($data, 'DES-EDE3', $key, OPENSSL_RAW_DATA); + return base64_encode($encData); + } + + /** + * this is the encryption function that combines the getkey() and encryptDes(). + */ + + public function encryption(string $params): string + { + //retrieve secret key + $key = $this->config->getEncryptkey(); + //encode the data and the + return $this->encrypt3Des($params, $key); + } + + /** + * @throws \Exception + */ + public function handleAuthState(\stdClass $response, $payload): array + { + $mode = $response->meta->authorization->mode; + if ($mode === 'pin') { + $data = $this->eventHandler->onAuthorization($response, ['logger' => $this->logger]); + $data['request_data'] = $payload; + return $data; + } + + return $this->eventHandler->onAuthorization($response, ['logger' => $this->logger]); + } + + public function getName(): string + { + return self::$name; + } +} diff --git a/src/Service/ChargeBacks.php b/src/Service/ChargeBacks.php new file mode 100644 index 0000000..d5082fd --- /dev/null +++ b/src/Service/ChargeBacks.php @@ -0,0 +1,68 @@ +logger->notice("ChargeBacks Service::Retrieving Chargeback.[flw_ref:{$flw_ref}]"); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."?flw_ref={$flw_ref}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getAll(array $filters = []): \stdClass + { + $query = http_build_query($filters) ?? ''; + $this->logger->notice('ChargeBacks Service::Retrieving Chargebacks.[all]'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."?{$query}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function accept(string $chargeback_id): \stdClass + { + $this->logger->notice("ChargeBacks Service::Accepting Chargeback [{$chargeback_id}]."); + self::startRecording(); + $response = $this->request([ 'action' => 'accept'], 'PUT', $this->name."/{$chargeback_id}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function decline(string $chargeback_id): \stdClass + { + $this->logger->notice("ChargeBacks Service::Declining Chargeback [{$chargeback_id}]."); + self::startRecording(); + $response = $this->request([ 'action' => 'decline'], 'PUT', $this->name."/{$chargeback_id}"); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/CollectionSubaccount.php b/src/Service/CollectionSubaccount.php new file mode 100644 index 0000000..9fd56d4 --- /dev/null +++ b/src/Service/CollectionSubaccount.php @@ -0,0 +1,120 @@ +name; + $this->url = $this->baseUrl.'/'.$endpoint; + $this->eventHandler = new SubaccountEventHandler(); + } + + public function confirmPayload(Payload $payload): array + { + foreach ($this->requiredParams as $param) { + if (! $payload->has($param)) { + $this->logger->error("Subaccount Service::The required parameter {$param} is not present in payload"); + throw new \InvalidArgumentException("Subaccount Service:The required parameter {$param} is not present in payload"); + } + } + + return $payload->toArray(); + } + + /** + * @param Payload $payload + * @return \stdClass + * @throws GuzzleException + */ + public function create(Payload $payload): \stdClass + { + $this->logger->notice('Subaccount Service::Creating new Collection Subaccount.'); + $body = $this->confirmPayload($payload); + $this->logger->notice('Subaccount Service::Payload Confirmed.'); + $this->eventHandler::startRecording(); + $response = $this->request($body, 'POST'); + + if (isset($response->status) && $response->status === 'success') { + $this->logger->notice('Subaccount Service::Collection Subaccount created successfully.'); + } else { + $this->logger->error('Subaccount Service::Collection Subaccount creation failed.'); + } + + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @return \stdClass + * @throws GuzzleException + */ + public function list(): \stdClass + { + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET'); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param string $id + * @return \stdClass + * @throws GuzzleException + */ + public function get(string $id): \stdClass + { + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "/{$id}"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param string $id + * @param Payload $payload + * @return \stdClass + * @throws GuzzleException + */ + public function update(string $id, Payload $payload): \stdClass + { + foreach ($this->requiredParamsUpdate as $param) { + if (! $payload->has($param)) { + $this->logger->error("Subaccount Service::The required parameter {$param} is not present in payload"); + throw new \InvalidArgumentException("Subaccount Service:The required parameter {$param} is not present in payload"); + } + } + + $payload = $payload->toArray(); + $this->eventHandler::startRecording(); + $response = $this->request($payload, 'PUT', "/{$id}"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param string $id + * @return \stdClass + * @throws GuzzleException + */ + public function delete(string $id): \stdClass + { + $this->eventHandler::startRecording(); + $response = $this->request(null, 'DELETE', "/{$id}"); + $this->eventHandler::setResponseTime(); + return $response; + } +} diff --git a/src/Service/Customer.php b/src/Service/Customer.php new file mode 100644 index 0000000..bfaf444 --- /dev/null +++ b/src/Service/Customer.php @@ -0,0 +1,28 @@ +set('fullname', $data['full_name']); + $person->set('email', $data['email']); + $person->set('phone_number', $data['phone']); + $person->set('address', $data['address'] ?? null); + + return $person; + } +} diff --git a/src/Service/Misc.php b/src/Service/Misc.php new file mode 100644 index 0000000..59cf6b7 --- /dev/null +++ b/src/Service/Misc.php @@ -0,0 +1,135 @@ +logger->info("Misc Service::Getting {$currency} wallet balance."); + self::startRecording(); + $response = $this->request(null, 'GET', "balances/{$currency}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getWallets(): \stdClass + { + $this->logger->info('Misc Service::Getting wallet balance(s).'); + self::startRecording(); + $response = $this->request(null, 'GET', 'balances'); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getBalanceHistory(array $queryParams): \stdClass + { + foreach ($this->requiredParamsHistory as $param) { + if (! array_key_exists($param, $queryParams)) { + $this->logger->error("Misc Service::The following parameter is missing to check balance history: {$param}"); + throw new \InvalidArgumentException("The following parameter is missing to check balance history: {$param}"); + } + } + + $query = http_build_query($queryParams); + $this->logger->info('Misc Service::Getting wallet balance(s).'); + self::startRecording(); + $response = $this->request(null, 'GET', "wallet/statement?{$query}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function resolveAccount(\Flutterwave\Payload $payload): \stdClass + { + $payload = $payload->toArray(); + foreach ($this->requiredParamsAccountResolve as $param) { + if (! array_key_exists($param, $payload)) { + $this->logger->error("Misc Service::The following parameter is missing to resolve account: {$param}"); + throw new \InvalidArgumentException("The following parameter is missing to resolve account: {$param}"); + } + } + + $this->logger->info('Misc Service::Resolving Account Details.'); + self::startRecording(); + $response = $this->request($payload, 'POST', 'accounts/resolve'); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function resolveBvn(string $bvn): \stdClass + { + $this->logger->info('Misc Service::Resolving BVN.'); + self::startRecording(); + $response = $this->request(null, 'GET', "kyc/bvns/{$bvn}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function resolveCardBin(string $bin): \stdClass + { + $this->logger->info('Misc Service::Resolving Card BIN.'); + self::startRecording(); + $response = $this->request(null, 'GET', "card-bins/{$bin}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function userBackgroundCheck(array $data): \stdClass + { + foreach ($this->requiredParamsUserBackground as $param) { + if (! array_key_exists($param, $data)) { + $this->logger->error("Misc Service::The following parameter is missing to check user background: {$param}"); + throw new \InvalidArgumentException("The following parameter is missing to check user background: {$param}"); + } + } + + $this->logger->info('Misc Service::Initiating User Background Check.'); + self::startRecording(); + $response = $this->request(null, 'GET', 'fraud-check'); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/MobileMoney.php b/src/Service/MobileMoney.php new file mode 100644 index 0000000..9a2369f --- /dev/null +++ b/src/Service/MobileMoney.php @@ -0,0 +1,155 @@ + 'mobile_money_rwanda', + Currency::GHS => 'mobile_money_ghana', + Currency::UGX => 'mobile_money_uganda', + Currency::XAF => 'mobile_money_franco', + Currency::ZMW => 'mobile_money_zambia', + ]; + + private array $networks = [ + 'GH' => ['MTN','VODOFONE','TIGO'], + 'UG' => ['MTN', 'AIRTEL'], + 'ZM' => ['MTN', 'ZAMTEL'], + ]; + + private array $supported_countries_franco = [ + 'CM', 'SN', 'BF', 'CI', + ]; + private ?MomoEventHandler $eventHandler = null; + + public function __construct(?ConfigInterface $config = null) + { + parent::__construct($config); + $endpoint = $this->getEndpoint(); + $this->url = $this->baseUrl.'/'.$endpoint.'?type='; + $this->eventHandler = new MomoEventHandler(); + } + + /** + * @param Payload $payload + * @return array + * @throws \Exception + */ + public function initiate(\Flutterwave\Payload $payload): array + { + return $this->charge($payload); + } + + /** + * @param Payload $payload + * @return array + * @throws GuzzleException + */ + public function charge(\Flutterwave\Payload $payload): array + { + $currency = $payload->get('currency'); + $otherData = $payload->get('otherData'); + + if (! array_key_exists($currency, $this->types)) { + $supported_currencies = json_encode(array_keys($this->types)); + $this->logger->warning("Momo Service::The currency {$currency} is not supported for this payment method. options [ {$supported_currencies} ]"); + throw new \InvalidArgumentException("The currency {$currency} is not supported for this payment method. options [ {$supported_currencies} ]"); + } + + if (is_null($otherData)) { + $this->logger->error("Momo Service::Please pass the parameter 'network' into the additionalData array"); + throw new \InvalidArgumentException("Please pass the parameter 'network' into the additionalData array"); + } + $this->isNetworkValid($otherData, $currency); + + $payload = $payload->toArray(); + + //request payload + $body = $payload; + + $type = $this->types[$currency]; + + MomoEventHandler::startRecording(); + $request = $this->request($body, 'POST', $type); + MomoEventHandler::setResponseTime(); + + return $this->handleAuthState($request, $body); + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + private function isNetworkValid(array $otherData, string $currency): bool + { + switch($currency) { + case Currency::GHS: + if (! isset($otherData['network'])) { + $this->logger->error('Ghana Momo Service::network parameter is required.'); + throw new \InvalidArgumentException('Ghana Momo Service: network parameter is required.'); + } + if (! in_array($otherData['network'], $this->networks['GH'])) { + $this->logger->error('network passed is not supported for ghana momo.'); + throw new \InvalidArgumentException('Ghana Momo Service: network passed is not supported. options: '. json_encode($this->networks['GH'])); + } + break; + case Currency::UGX: + if (! isset($otherData['network'])) { + $this->logger->error('Uganda Momo Service::network parameter is required.'); + throw new \InvalidArgumentException('Uganda Momo Service: network parameter is required.'); + } + if (! in_array($otherData['network'], $this->networks['UG'])) { + $this->logger->error('network passed is not supported for uganda momo.'); + throw new \InvalidArgumentException('Uganda Momo Service: network passed is not supported.'); + } + break; + case Currency::ZMW: + if (! isset($otherData['network'])) { + $this->logger->error('Zambia Momo Service::network parameter is required.'); + throw new \InvalidArgumentException('Uganda Momo Service: network parameter is required.'); + } + if (! in_array($otherData['network'], $this->networks['ZM'])) { + $this->logger->error('network passed is not supported for zambia momo.'); + throw new \InvalidArgumentException('Zambia Momo Service: network passed is not supported.'); + } + break; + case Currency::XAF: + if (! isset($otherData['country'])) { + $this->logger->error('Franco Momo Service::country parameter is required.'); + throw new \InvalidArgumentException('Franco Momo Service: country parameter is required.'); + } + if (! in_array($otherData['country'], $this->supported_countries_franco)) { + $this->logger->error('Franco Momo Service::country passed is not supported.'); + throw new \InvalidArgumentException('Franco Momo Service: country passed is not supported.'); + } + break; + } + + return true; + } + + /** + * @param \stdClass $response + * @param array $payload + * @return array + */ + private function handleAuthState(\stdClass $response, array $payload): array + { + return $this->eventHandler->onAuthorization($response, ['logger' => $this->logger]); + } +} diff --git a/src/Service/Mpesa.php b/src/Service/Mpesa.php new file mode 100644 index 0000000..5ac7a02 --- /dev/null +++ b/src/Service/Mpesa.php @@ -0,0 +1,93 @@ +getEndpoint(); + $this->url = $this->baseUrl.'/'.$endpoint.'?type='; + $this->eventHandler = new MpesaEventHandler(); + } + + /** + * @throws Exception + */ + public function initiate(\Flutterwave\Payload $payload): array + { + return $this->charge($payload); + } + + /** + * @throws Exception + * @throws \Exception + */ + public function charge(\Flutterwave\Payload $payload): array + { + $this->logger->notice('Charging via Mpesa ...'); + + $number = $payload->get('customer')->toArray()['phone_number']; + $currency = $payload->get('currency'); + + if (\is_null($number)) { + $this->logger->warning('Phone parameter required for the request.'); + throw new \InvalidArgumentException('Phone parameter required for the request. '); + } + + if (! \is_null($currency) && $currency !== 'KES') { + $this->logger->warning("The currency {$currency} is not supported for Mpesa transaction."); + throw new \InvalidArgumentException("The currency {$currency} is not supported for Mpesa transaction."); + } + + $payload = $payload->toArray(); + + //request payload + $body = $payload; + + unset($body['country']); + unset($body['address']); + + MpesaEventHandler::startRecording(); + $request = $this->request($body, 'POST', self::TYPE); + MpesaEventHandler::setResponseTime(); + + return $this->handleAuthState($request, $body); + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + /** + * @throws \Exception + */ + private function handleAuthState(\stdClass $response, array $payload): array + { + $mode = $response->data->auth_model; + $this->logger->info("Mpesa Auth Mode: {$mode}"); + return [ + 'status' => $response->data->status, + 'transactionId' => $response->data->id, + 'dev_instruction' => 'The customer should authorize the payment on their Phones via the Mpesa. status is pending', + 'instruction' => 'Please kindly authorize the payment on your Mobile phone', + 'mode' => $mode, + ]; + } +} diff --git a/src/Service/Otps.php b/src/Service/Otps.php new file mode 100644 index 0000000..b4fc496 --- /dev/null +++ b/src/Service/Otps.php @@ -0,0 +1,98 @@ +checkPayloadOTP($payload); + + $payload = $payload->toArray(); + + $body = [ + 'length' => $payload['length'], + 'customer' => [ + 'name' => $payload['fullname'] ?? 'flw customer', + 'email' => $payload['email'], + 'phone' => $payload['phone_number'], + ], + 'sender' => $payload['sender'] ?? 'Flutterwave-PHP', + 'send' => $payload['send'] ?? false, + 'medium' => $payload['medium'] ?? ['sms', 'whatsapp'], + ]; + + $this->logger->notice('OTP Service::Creating an OTP.'); + self::startRecording(); + $response = $this->request($body, 'POST', $this->name); + $this->logger->notice('OTP Service::Created OTP Successfully.'); + self::setResponseTime(); + return $response; + } + + public function validate(?string $otp = null, ?string $reference = null): \stdClass + { + if (is_null($otp)) { + $this->logger->error('OTP Service::Please pass an OTP.'); + throw new \InvalidArgumentException('OTP Service::Please pass OTP.'); + } + + if (is_null($reference)) { + $this->logger->error('OTP Service::Please pass a reference.'); + throw new \InvalidArgumentException('OTP Service::Please pass a reference.'); + } + + $body = ['otp' => $otp]; + $this->logger->notice('OTP Service::Validating OTP.'); + self::startRecording(); + $response = $this->request($body, 'POST', $this->name."/{$reference}/validate"); + $this->logger->notice('OTP Service::Validated OTP Successfully.'); + self::setResponseTime(); + return $response; + } + + private function checkPayloadOTP(\Flutterwave\Payload $payload): void + { + if (! $payload->has('length')) { + throw new \InvalidArgumentException("OTP Service:: Required Parameter 'length'. + This is Integer length of the OTP being generated. Expected values are between 5 and 7."); + } + + if (! $payload->has('customer')) { + throw new \InvalidArgumentException("OTP Service:: Required Parameter 'customer'. + This is customer object used to include the recipient information."); + } + + if (! $payload->has('sender')) { + throw new \InvalidArgumentException("OTP Service:: Required Parameter 'sender'. + This is your merchant/business name. It would display when the OTP is sent."); + } + + if (! $payload->has('send')) { + throw new \InvalidArgumentException("OTP Service:: Required Parameter 'send'. + Set to true to send otp to customer.."); + } + + if (! $payload->has('medium')) { + throw new \InvalidArgumentException("OTP Service:: Required Parameter 'medium'. + Pass the medium you want your customers to receive the OTP on. Expected values are sms, email and whatsapp."); + } + } +} diff --git a/src/Service/PayPal.php b/src/Service/PayPal.php new file mode 100644 index 0000000..c3bcbc4 --- /dev/null +++ b/src/Service/PayPal.php @@ -0,0 +1,15 @@ +validSuppliedData($data); + if (! $check['result']) { + throw new \InvalidArgumentException("".$check['missing_param'].''.' is required in the payload'); + } + + $currency = $data['currency']; + $amount = $data['amount']; + $customer = $data['customer']; + $redirectUrl = $data['redirectUrl'] ?? null; + $otherData = $data['additionalData'] ?? null; + $phone_number = $data['phone'] ?? null; + + if (isset($data['pin']) && ! empty($data['pin'])) { + $otherData['pin'] = $data['pin']; + } + + $payload = new Load(); + + if (! \is_null($phone_number)) { + $payload->set('phone', $phone_number); + } + + $tx_ref = $data['tx_ref'] ?? $payload->generateTxRef(); + +// $payload->set('phone_number', $phone_number); // customer factory handles that + $payload->set('currency', $currency); + $payload->set('amount', $amount); + $payload->set('tx_ref', $tx_ref); + $payload->set('customer', $customer); + $payload->set('redirect_url', $redirectUrl); + $payload->set('otherData', $otherData); + + return $payload; + } + + public function validSuppliedData(array $data): array + { + $params = $this->requiredParams; + + foreach ($params as $param) { + if (! array_key_exists($param, $data)) { + return ['missing_param' => $param, 'result' => false]; + } + } + + if (! $data['customer'] instanceof \Flutterwave\Customer) { + return ['missing_param' => 'customer', 'result' => false]; + } + + return ['missing_param' => null, 'result' => true]; + } +} diff --git a/src/Service/PaymentPlan.php b/src/Service/PaymentPlan.php new file mode 100644 index 0000000..0f433af --- /dev/null +++ b/src/Service/PaymentPlan.php @@ -0,0 +1,99 @@ +toArray(); + foreach ($this->requiredParams as $param) { + if (! array_key_exists($param, $payload)) { + $this->logger->error("Payment Plan Service::The required parameter {$param} is not present in payload"); + throw new \InvalidArgumentException("Payment Plan Service:The required parameter {$param} is not present in payload"); + } + } + + $body = $payload; + + $this->logger->notice('Payment Plan Service::Creating a Plan.'); + self::startRecording(); + $response = $this->request($body, 'POST', $this->name); + $this->logger->notice('Payment Plan Service::Created a Plan Successfully.'); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function get(string $id): \stdClass + { + $this->logger->notice("Payment Plan Service::Retrieving a Plan ({$id})."); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."/{$id}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function list(): \stdClass + { + $this->logger->notice('Payment Plan Service::Retrieving all Plans.'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function update(string $id, \Flutterwave\Payload $payload): \stdClass + { + if (! $payload->has('amount') && ! $payload->has('status')) { + $msg = "Payment Plan Service(Action:Update):Please pass the required params: 'amount' and 'status'"; + $this->logger->error($msg); + throw new \InvalidArgumentException($msg); + } + + $this->logger->notice("Payment Plan Service::Updating Plan id:({$id})"); + self::startRecording(); + $response = $this->request(null, 'PUT', $this->name."/{$id}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function cancel(string $id): \stdClass + { + $this->logger->notice("Payment Plan Service::Canceling Plan id:({$id})"); + self::startRecording(); + $response = $this->request(null, 'PUT', $this->name."/{$id}/cancel"); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/PayoutSubaccount.php b/src/Service/PayoutSubaccount.php new file mode 100644 index 0000000..73b45ab --- /dev/null +++ b/src/Service/PayoutSubaccount.php @@ -0,0 +1,128 @@ +name; + $this->url = $this->baseUrl.'/'.$endpoint; + $this->eventHandler = new PayoutSubaccoutEventHandler(); + } + + public function confirmPayload(Payload $payload): array + { + //TODO: throw exceptions on missing params + $customer = $payload->get('customer')->toArray(); + $email = $customer['email']; + $phone = $customer['phone_number']; + $fullname = $customer['fullname']; + $country = $payload->get('country'); + $this->logger->notice('PSA Service::Confirming Payload...'); + return [ + 'email' => $email, + 'mobilenumber' => $phone, + 'account_name' => $fullname, + 'country' => $country, + ]; + } + + /** + * @throws Exception + */ + public function create(Payload $payload): \stdClass + { + $this->logger->notice('PSA Service::Creating new Payout Subaccount.'); + $body = $this->confirmPayload($payload); + $this->logger->notice('PSA Service::Payload Confirmed.'); + $this->eventHandler::startRecording(); + $response = $this->request($body, 'POST'); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function list(): \stdClass + { + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET'); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function get(string $account_reference): \stdClass + { + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "/{$account_reference}"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function update(string $account_reference, Payload $payload): \stdClass + { + if (! $payload->has('account_name') || ! $payload->has('mobilenumber') || ! $payload->has('email')) { + $msg = "Please pass the required paramters:'account_name','mobilenumber',and 'email' "; + $this->logger->error($msg); + throw new \InvalidArgumentException($msg); + } + + $this->eventHandler::startRecording(); + $response = $this->request($payload->toArray(), 'PUT', "/{$account_reference}"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function fetchTransactions(string $account_reference): \stdClass + { + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "/{$account_reference}/transactions"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function fetchAvailableBalance(string $account_reference, string $currency = 'NGN'): \stdClass + { + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "/{$account_reference}/balances?currency={$currency}"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function fetchStaticVirtualAccounts(string $account_reference, string $currency = 'NGN'): \stdClass + { + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "/{$account_reference}/static-account?currency={$currency}"); + $this->eventHandler::setResponseTime(); + return $response; + } +} diff --git a/src/Service/Preauth.php b/src/Service/Preauth.php new file mode 100644 index 0000000..f8565b9 --- /dev/null +++ b/src/Service/Preauth.php @@ -0,0 +1,163 @@ +cardService = new CardPayment($config); + $endpoint = $this->getEndpoint(); + $this->url = $this->baseUrl.'/'.$endpoint; + $this->eventHandler = new PreEventHandler(); + } + + /** + * @throws Exception + */ + public function initiate(\Flutterwave\Payload $payload): ?array + { + $this->logger->info('Preauth Service::Updated Payload...'); + $payload->set('preauthorize', 1); + $payload->set('usesecureauth', 1); + $this->logger->info('Preauth Service::Communicating to Card Service...'); + return $this->charge($payload); + } + + /** + * @throws Exception + */ + public function charge(\Flutterwave\Payload $payload): ?array + { + PreEventHandler::startRecording(); + $response = $this->cardService->initiate($payload); + PreEventHandler::setResponseTime(); + return $response; + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + /** + * @throws Exception + */ + public function capture(string $flw_ref, string $method = 'card', string $amount = '0'): array + { + $method = strtolower($method); + switch ($method) { + case 'paypal': + $data = [ + 'flw_ref' => $flw_ref, + ]; + $this->logger->info("Preauth Service::Capturing PayPal Payment with FLW_REF:{$flw_ref}..."); + $response = $this->request($data, 'POST', '/paypal-capture'); + break; + default: + $data = ['amount' => $amount]; + $this->logger->info("Preauth Service::Capturing Payment with FLW_REF:{$flw_ref}..."); + $response = $this->request($data, 'POST', "/{$flw_ref}/capture"); + break; + } + + $data['message'] = null; + + if (property_exists($response, 'data')) { + $transactionId = $response->data->id; + $tx_ref = $response->data->tx_ref; + $flw_ref = $response->data->flw_ref; + $data['transactionId'] = $transactionId; + $data['tx_ref'] = $tx_ref; + $data['flw_ref'] = $flw_ref; + $data['message'] = $response->message; + } + + $msg = $data['message'] ?? 'Charge Capturing Failed!'; + $this->logger->info("Preauth Service::{$msg}..."); + + return $data ?? [ 'message' => 'Charge Capturing Failed!']; + } + + /** + * @throws Exception + */ + public function void(string $flw_ref, string $method = 'card'): array + { + $method = strtolower($method); + switch ($method) { + case 'paypal': + $data = [ + 'flw_ref' => $flw_ref, + ]; + $this->logger->info("Preauth Service::Voiding Payment with FLW_REF:{$flw_ref}..."); + PreEventHandler::startRecording(); + $response = $this->request($data, 'POST', '/paypal-void'); + PreEventHandler::setResponseTime(); + break; + default: + PreEventHandler::startRecording(); + $this->logger->info("Preauth Service::Voiding Payment with FLW_REF:{$flw_ref}..."); + PreEventHandler::setResponseTime(); + $response = $this->request(null, 'POST', "/{$flw_ref}/void"); + break; + } + + $data['message'] = null; + + if (property_exists($response, 'data')) { + $transactionId = $response->data->id; + $tx_ref = $response->data->tx_ref; + $flw_ref = $response->data->flw_ref; + $data['transactionId'] = $transactionId; + $data['tx_ref'] = $tx_ref; + $data['flw_ref'] = $flw_ref; + $data['message'] = $response->message; + } + + $msg = $data['message'] ?? 'Charge Voiding Failed!'; + $this->logger->info("Preauth Service::{$msg}..."); + + return $data ?? [ 'message' => 'Charge Voiding Failed!']; + } + + /** + * @throws Exception + */ + public function refund(string $flw_ref): array + { + $this->logger->info("Preauth Service::Refunding Payment with FLW_REF:{$flw_ref}..."); + PreEventHandler::startRecording(); + $response = $this->request(null, 'POST', "/{$flw_ref}/refund"); + PreEventHandler::setResponseTime(); + $data['message'] = null; + if (property_exists($response, 'data')) { + $transactionId = $response->data->id; + $tx_ref = $response->data->tx_ref; + $flw_ref = $response->data->flw_ref; + $data['transactionId'] = $transactionId; + $data['tx_ref'] = $tx_ref; + $data['flw_ref'] = $flw_ref; + $data['message'] = $response->message; + } + + $msg = $data['message'] ?? 'Charge Refund Failed!'; + $this->logger->info("Preauth Service::{$msg}..."); + + return $data ?? [ 'message' => 'Charge Refund Failed!']; + } +} diff --git a/src/Service/Remita.php b/src/Service/Remita.php new file mode 100644 index 0000000..cff9a8b --- /dev/null +++ b/src/Service/Remita.php @@ -0,0 +1,35 @@ +customer = new Customer(); + $this->payload = new Payload(); + $this->config = is_null($config) ? self::$spareConfig : $config; + $this->http = $this->config->getHttp(); + $this->logger = $this->config->getLoggerInstance(); + $this->secret = $this->config->getSecretKey(); + $this->url = $this->config::getBaseUrl().'/'; + $this->baseUrl = $this->config::getBaseUrl(); + } + + public function getName(): string + { + return self::$name; + } + + /** + * @param array|null $data + * @param string $verb + * @param string $additionalurl + * @return stdClass + * @throws GuzzleException + */ + protected function request(?array $data = null, string $verb = 'GET', string $additionalurl = ''): stdClass + { + $secret = $this->config->getSecretKey(); + + switch ($verb) { + case 'POST': + $response = $this->http->request('POST', $this->url.$additionalurl, [ + 'debug' => false, # TODO: turn to false on release. + 'headers' => [ + 'Authorization' => "Bearer $secret", + 'Content-Type' => 'application/json', + ], + 'json' => $data, + ]); + break; + case 'PUT': + $response = $this->http->request('PUT', $this->url.$additionalurl, [ + 'debug' => false, # TODO: turn to false on release. + 'headers' => [ + 'Authorization' => "Bearer $secret", + 'Content-Type' => 'application/json', + ], + 'json' => $data ?? [], + ]); + break; + case 'DELETE': + $response = $this->http->request('DELETE', $this->url.$additionalurl, [ + 'debug' => false, + 'headers' => [ + 'Authorization' => "Bearer $secret", + 'Content-Type' => 'application/json', + ], + ]); + break; + default: + $response = $this->http->request('GET', $this->url.$additionalurl, [ + 'debug' => false, + 'headers' => [ + 'Authorization' => "Bearer $secret", + 'Content-Type' => 'application/json', + ], + ]); + break; + } + + $body = $response->getBody()->getContents(); + return json_decode($body); + } + + protected function checkTransactionId($transactionId): void + { + $pattern = '/([0-9]){7}/'; + $is_valid = preg_match_all($pattern, $transactionId); + + if (! $is_valid) { + $this->logger->warning('Transaction Service::cannot verify invalid transaction id. '); + throw new InvalidArgumentException('cannot verify invalid transaction id.'); + } + } + + private static function bootstrap(?ConfigInterface $config = null): void + { + if (is_null($config)) { + require __DIR__.'/../../setup.php'; + $config = Config::setUp( + $_SERVER[Config::SECRET_KEY], + $_SERVER[Config::PUBLIC_KEY], + $_SERVER[Config::ENCRYPTION_KEY], + $_SERVER['ENV'] + ); + } + self::$spareConfig = $config; + } +} diff --git a/src/Service/Settlement.php b/src/Service/Settlement.php new file mode 100644 index 0000000..8f56990 --- /dev/null +++ b/src/Service/Settlement.php @@ -0,0 +1,43 @@ +logger->notice("Settlement Service::Retrieving Settlement [{$id}]."); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."/{$id}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function list(): \stdClass + { + $this->logger->notice('Settlement Service::Retrieving all Settlements.'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/Subscription.php b/src/Service/Subscription.php new file mode 100644 index 0000000..40a154c --- /dev/null +++ b/src/Service/Subscription.php @@ -0,0 +1,55 @@ +logger->notice('Subscription Service::Retrieving all Subscriptions.'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function activate(string $id): \stdClass + { + $this->logger->notice("Subscription Service::Activating a Subscriptions [{$id}]."); + self::startRecording(); + $response = $this->request(null, 'PUT', $this->name."/{$id}/activate"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function deactivate(string $id): \stdClass + { + $this->logger->notice("Subscription Service::Deactivating a Subscriptions [{$id}]."); + self::startRecording(); + $response = $this->request(null, 'PUT', $this->name."/{$id}/cancel"); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/TokenizedCharge.php b/src/Service/TokenizedCharge.php new file mode 100644 index 0000000..548c82d --- /dev/null +++ b/src/Service/TokenizedCharge.php @@ -0,0 +1,84 @@ +getEndpoint()}"; + $this->url = $this->baseUrl.'/'.$endpoint; + $this->eventHandler = new TkEventHandler(); + } + + /** + * @throws Exception + */ + public function initiate(\Flutterwave\Payload $payload) + { + $this->logger->notice('Tokenize Service::Initiating Card Payment...'); + if (! $this->checkPayloadIsValid($payload, 'token')) { + $msg = 'Tokenize Service::Please enter token parameter within the additionalData array'; + $this->logger->notice($msg); + throw new \InvalidArgumentException($msg); + } + + $this->logger->notice('Tokenize Service::Payload Confirmed...'); + return $this->charge($payload); + } + + /** + * @throws Exception + */ + public function charge(\Flutterwave\Payload $payload): array + { + # format the customer object to extract the first_name and the last name. + $customer = $payload->get('customer')->toArray(); + $fullname = $customer['fullname']; + $names = explode(' ', $fullname); + $first_name = $names[0]; + $last_name = $names[1]; + + $payload->set('first_name', $first_name); + $payload->set('last_name', $last_name); + $payload = $payload->toArray(); + $body = $payload; + + TkEventHandler::startRecording(); + $request = $this->request($body, 'POST'); + TkEventHandler::setResponseTime(); + return $this->handleAuthState($request, $payload); + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + private function handleAuthState(\stdClass $response, $payload): array + { + if (property_exists($response, 'data')) { + $transactionId = $response->data->id; + $tx_ref = $response->data->tx_ref; + $data['tx_ref'] = $tx_ref; + $data['transanctionId'] = $transactionId; + $data['status'] = $response->data->status; + $this->logger->notice("Tokenize Service::Retrieved Status...{$data['status']}"); + } + return $data ?? [ 'status' => 'Pending' ]; + } +} diff --git a/src/Service/Transactions.php b/src/Service/Transactions.php new file mode 100644 index 0000000..14439ac --- /dev/null +++ b/src/Service/Transactions.php @@ -0,0 +1,225 @@ +baseUrl = $this->config::BASE_URL; + $this->end_point = Transactions::ENDPOINT; + $this->eventHandler = new TransactionVerificationEventHandler(); + } + + /** + * @throws Exception + */ + public function verify(string $transactionId): \stdClass + { + $this->checkTransactionId($transactionId); + $this->logger->notice('Transaction Service::Verifying Transaction...'.$transactionId); + TransactionVerificationEventHandler::startRecording(); + $response = $this->request( + null, + 'GET', + self::ENDPOINT."/{$transactionId}/verify", + ); + TransactionVerificationEventHandler::setResponseTime(); + + return $response; + } + + /** + * @throws Exception + */ + public function verifyWithTxref(string $tx_ref): \stdClass + { + $this->logger->notice('Transaction Service::Verifying Transaction...'.$tx_ref); + TransactionVerificationEventHandler::startRecording(); + $response = $this->request( + null, + 'GET', + self::ENDPOINT.'/verify_by_reference?tx_ref='.$tx_ref, + ); + TransactionVerificationEventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function refund(string $trasanctionId): \stdClass + { + $this->checkTransactionId($trasanctionId); + $this->logger->notice("Transaction Service::Refunding Transaction...{$trasanctionId}"); + TransactionVerificationEventHandler::startRecording(); + $response = $this->request( + null, + 'GET', + self::ENDPOINT."/{$trasanctionId}/refund", + ); + TransactionVerificationEventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getAllTransactions(): \stdClass + { + $this->logger->notice('Transaction Service::Retrieving all Transaction for Merchant'); + TransactionVerificationEventHandler::startRecording(); + $response = $this->request( + null, + 'GET', + self::ENDPOINT, + ); + TransactionVerificationEventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getRefundInfo(string $trasanctionId): \stdClass + { + $this->checkTransactionId($trasanctionId); + $this->logger->notice("Transaction Service::Retrieving refund:Transactionid => {$trasanctionId}"); + TransactionVerificationEventHandler::startRecording(); + $response = $this->request( + null, + 'GET', + "refunds/{$trasanctionId}", + ); + TransactionVerificationEventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getTransactionFee(string $amount, string $currency = 'NGN', string $payment_type = 'card'): \stdClass + { + if (! $amount) { + $msg = 'Please pass a valid amount'; + $this->logger->warning($msg); + throw new \InvalidArgumentException($msg); + } + $data = [ + 'amount' => $amount, + 'currency' => $currency, + ]; + + if (! isset($this->payment_type[$payment_type])) { + $logData = json_encode($this->payment_type); + $msg = "Please pass a valid Payment Type: options::{$logData}"; + $this->logger->warning($msg); + throw new \InvalidArgumentException($msg); + } + + $data['payment_type'] = $payment_type; + + $query = http_build_query($data); + + $logData = json_encode($data); + $this->logger->notice("Transaction Service::Retrieving Transaction Fee: Util => {$logData}"); + TransactionVerificationEventHandler::startRecording(); + $response = $this->request( + null, + 'GET', + self::ENDPOINT."/fee?{$query}", + ); + TransactionVerificationEventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function resendFailedHooks(string $transactionId): \stdClass + { + $this->checkTransactionId($transactionId); + $this->logger->notice("Transaction Service::Resending Transaction Webhook: TransactionId => {$transactionId}"); + TransactionVerificationEventHandler::startRecording(); + $response = $this->request( + null, + 'GET', + self::ENDPOINT."/{$transactionId}/resend-hook", + ); + TransactionVerificationEventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function retrieveTimeline(string $transactionId): \stdClass + { + $this->checkTransactionId($transactionId); + $this->logger->notice("Transaction Service::Retrieving Transaction Timeline: TransactionId => {$transactionId}"); + TransactionVerificationEventHandler::startRecording(); + $response = $this->request( + null, + 'GET', + self::ENDPOINT."/{$transactionId}/timeline", + ); + TransactionVerificationEventHandler::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function validate(string $otp, string $flw_ref): \stdClass + { + $logData = json_encode( + [ + 'flw_ref' => $flw_ref, + 'date' => date('mm-dd-YYYY h:i:s'), + ] + ); + + $this->logger->notice('Transaction Service::Validating Transaction ...'.$logData); + + $data = [ + 'otp' => $otp, + 'flw_ref' => $flw_ref, +// "type" => "card" //default would be card + ]; + + return $this->request( + $data, + 'POST', + self::VALIDATE_TRANSACTION, + ); + } + + public function getName(): string + { + return self::$name; + } +} diff --git a/src/Service/Transfer.php b/src/Service/Transfer.php new file mode 100644 index 0000000..2b574c3 --- /dev/null +++ b/src/Service/Transfer.php @@ -0,0 +1,242 @@ +url = $this->baseUrl.'/'.$endpoint; + $this->eventHandler = new TransferEventHandler(); + } + + /** + * @param Payload $payload + * @return array + * @throws GuzzleException + */ + public function initiate(Payload $payload): array + { + $tx_ref = $payload->get('tx_ref'); + $this->logger->info("Transfer Service::Initiating Transfer....$tx_ref"); + if ($this->checkPayloadIsValid($payload, 'account_details')) { + return $this->charge($payload); + } + throw new InvalidArgumentException('Please check your payload'); + } + + /** + * @param Payload $payload + * @return array + * @throws GuzzleException + */ + public function charge(Payload $payload): array + { + $additionalData = $payload->get('otherData'); + $tx_ref = $payload->get('tx_ref'); + + if (! array_key_exists('narration', $additionalData)) { + throw new InvalidArgumentException("Please pass the parameter 'narration' in the additionalData array"); + } + $this->logger->notice('Transfer Service::Transferring to account ...'); + + $payload->set('reference', $tx_ref); + + $payload = $payload->toArray('account'); + + unset($payload['tx_ref']); + unset($payload['address']); + + $this->eventHandler::startRecording(); + $response = $this->request($payload, 'POST'); + $this->eventHandler::setResponseTime(); + return $this->handleInitiationResponse($response); //TODO: change to return an Array + } + + private function handleInitiationResponse(stdClass $data): array + { + $root = $data->data; + return [ + 'id' => $root->id, + 'account_number' => $root->account_number, + 'bank_code' => $root->bank_code, + 'full_name' => $root->full_name, + 'currency' => $root->currency, +// 'debit_currency' => $root->debit_currency, + 'reference' => $root->reference, + 'amount' => $root->amount, + 'status' => $root->status, + 'bank_name' => $root->bank_name + ]; + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + /** + * @param string|null $transactionId + * @return stdClass + * retry a previously failed transfer. + * + * @throws GuzzleException + */ + public function retry(?string $transactionId): stdClass + { + $this->checkTransactionId($transactionId); + $this->logger->notice("Transfer Service::Retrieving Settlement [$transactionId]."); + $this->eventHandler::startRecording(); + $response = $this->request(null, 'POST', $this->name."/$transactionId/retries"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param Payload $payload + * @return stdClass + * @throws GuzzleException + */ + public function createBulk(Payload $payload): stdClass + { + if (! $payload->has('bulk_data')) { + $this->logger->error('Transfer Service::Bulk Payload is empty. Pass a filled array'); + throw new InvalidArgumentException('Transfer Service::Bulk Payload is currently empty. Pass a filled array'); + } + + $body = $payload->toArray(); + $this->logger->notice('Transfer Service::Creating a Bulk Transfer.'); + $this->eventHandler::startRecording(); + $response = $this->request($body, 'POST', 'bulk-transfers'); + $this->logger->notice('Transfer Service::Created a Bulk Transfer Successfully.'); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param string $id + * @return stdClass + * @throws GuzzleException + */ + public function get(string $id): stdClass + { + $this->logger->notice("Transfer Service::Retrieving Transfer id:($id)"); + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', $this->name."/$id"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @return stdClass + * @throws GuzzleException + */ + public function getAll(): stdClass + { + $this->logger->notice('Transfer Service::Retrieving all Transfers'); + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', $this->name); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param array $params + * @return stdClass + * @throws GuzzleException + */ + public function getFee(array $params = []): stdClass + { + foreach ($this->requiredParamsFee as $param) { + if (! array_key_exists($param, $params)) { + $this->logger->error("Transfer Service::the following param is required to get transfer fee: $param"); + throw new InvalidArgumentException("Transfer Service::the following param is required to get transfer fee: $param"); + } + } + + $query = http_build_query($params); + $this->logger->notice('Transfer Service::Retrieving Transfer Fee'); + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "/fee?$query"); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param string $id + * @return stdClass + * @throws GuzzleException + */ + public function getRetry(string $id): stdClass + { + $this->logger->notice("Transfer Service::Retrieving Transfer id:($id)"); + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "/$id/retries"); + $this->logger->info('Transfer Service::Transfer retry attempts retrieved.'); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param string $batch_id + * @return stdClass + * @throws GuzzleException + */ + public function getBulk(string $batch_id): stdClass + { + $this->logger->notice("Transfer Service::Retrieving Bulk Transfer id:($batch_id)"); + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "?batch_id=$batch_id"); + $this->logger->info('Transfer Service::Bulk Transfer retrieved.'); + $this->eventHandler::setResponseTime(); + return $response; + } + + /** + * @param array $params + * @return stdClass + * @throws GuzzleException + */ + public function getRates(array $params): stdClass + { + foreach ($this->requiredParamsRate as $param) { + if (! array_key_exists($param, $params)) { + $this->logger->error("Transfer Service::the following param is required to get transfer rate: $param"); + throw new InvalidArgumentException("Transfer Service::the following param is required to get transfer rate: $param"); + } + } + + $query = http_build_query($params); + $logData = json_encode($params); + $this->logger->notice("Transfer Service::Retrieving Transfer Rate data:($logData)"); + $this->eventHandler::startRecording(); + $response = $this->request(null, 'GET', "?$query"); + $this->logger->info('Transfer Service::Transfer rate retrieved.'); + $this->eventHandler::setResponseTime(); + return $response; + } +} diff --git a/src/Service/Ussd.php b/src/Service/Ussd.php new file mode 100644 index 0000000..39f1ef1 --- /dev/null +++ b/src/Service/Ussd.php @@ -0,0 +1,125 @@ + 'Access Bank', + '050' => 'Ecobank', + '070' => 'Fidelity', + '011' => 'First Bank of Nigeria', + '214' => 'First city monument bank', + '058' => 'Guranteed Trust Bank', + '030' => 'Heritage Bank', + '082' => 'Keystone Bank', + '221' => 'Stanbic IBTC bank', + '232' => 'Sterling bank', + '032' => 'Union bank', + '033' => 'United bank for Africa', + '215' => 'United Bank', + '090110' => 'VFD microfinance bank', + '035' => 'Wema bank', + '057' => 'Zenith bank', + ]; + public function __construct(?ConfigInterface $config = null) + { + parent::__construct($config); + + $endpoint = $this->getEndpoint(); + $this->url = $this->baseUrl.'/'.$endpoint.'?type='; + $this->eventHandler = new UssdEventHandler(); + } + + /** + * @param Payload $payload + * @return array + * @throws \Exception + */ + public function initiate(\Flutterwave\Payload $payload): array + { + $this->logger->info('Ussd Service::Initiated Ussd Charge'); + return $this->charge($payload); + } + + /** + * @param Payload $payload + * @return array + * @throws GuzzleException + */ + public function charge(\Flutterwave\Payload $payload): array + { + $otherData = $payload->get('otherData'); + + if (empty($otherData)) { + $msg = "Please pass the missing parameters 'account_number' and 'account_bank'"; + $this->logger->error("Ussd Service::{$msg}"); + throw new \InvalidArgumentException("Ussd Service::{$msg}"); + } + + foreach ($this->requiredParam as $param) { + if (! array_key_exists($param, $otherData)) { + $msg = "Please pass the missing parameter '{$param}'"; + $this->logger->error("Ussd Service::{$msg}"); + throw new \InvalidArgumentException("Ussd Service::{$msg}"); + } + } + + $bank = $otherData['account_bank']; + + if (! array_key_exists($bank, $this->supported_banks)) { + $this->logger->error('USSD Service: We do not support your bank. please kindly use another. '); + throw new \InvalidArgumentException('USSD Service: We do not support your bank. please kindly use another. '); + } + + $payload = $payload->toArray(); + + //request payload + $body = $payload; + + unset($body['country']); + unset($body['address']); + + UssdEventHandler::startRecording(); + $this->logger->info('Ussd Service::Generating Ussd Code'); + $request = $this->request($body, 'POST', self::TYPE); + $this->logger->info('Ussd Service::Generated Ussd Code Successfully'); + UssdEventHandler::setResponseTime(); + + return $this->handleAuthState($request, $body); + } + + public function save(callable $callback): void + { + // TODO: Implement save() method. + } + + /** + * @param \stdClass $response + * @param array $payload + * @return array + * @throws \Exception + */ + private function handleAuthState(\stdClass $response, array $payload): array + { + return $this->eventHandler->onAuthorization($response, ['logger' => $this->logger]); + } +} diff --git a/src/Service/VirtualAccount.php b/src/Service/VirtualAccount.php new file mode 100644 index 0000000..8248f9a --- /dev/null +++ b/src/Service/VirtualAccount.php @@ -0,0 +1,122 @@ +logger->notice('VirtualAccount Service::Creating new Virtual Account.'); + + //check email and bvn are in payload + if (! isset($payload['email']) || ! isset($payload['bvn'])) { + $this->logger->error('VirtualAccount Service::The required parameter email or bvn is not present in payload'); + throw new \InvalidArgumentException('The required parameter email or bvn is not present in payload'); + } + + $this->logger->notice('VirtualAccount Service::Payload Confirmed.'); + self::startRecording(); + $response = $this->request($payload, 'POST', "{$this->name}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function createBulk(array $payload): \stdClass + { + if (! isset($payload['is_permanent'])) { + $payload['is_permanent'] = false; + } + + $this->logger->notice('VirtualAccount Service::Creating Bulk Virtual Accounts.'); + //check accounts and email are in payload + if (! isset($payload['accounts']) || ! isset($payload['email'])) { + $this->logger->error('VirtualAccount Service::The required parameter accounts or email is not present in payload'); + throw new \InvalidArgumentException('The required parameter accounts or email is not present in payload'); + } + + $this->logger->notice('VirtualAccount Service:: Payload Confirmed [Bulk].'); + + self::startRecording(); + $response = $this->request($payload, 'POST', 'bulk-virtual-account-numbers'); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function get($order_ref): \stdClass + { + $this->logger->notice("VirtualAccount Service::Retrieving Virtual Account [{$order_ref}]."); + self::startRecording(); + $response = $this->request(null, 'GET', "{$this->name}/{$order_ref}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getBulk($batch_id): \stdClass + { + $this->logger->notice("VirtualAccount Service::Retrieving Bulk Virtual Accounts [{$batch_id}]."); + self::startRecording(); + $response = $this->request(null, 'GET', "bulk-virtual-account-numbers/{$batch_id}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function update(array $payload): \stdClass + { + //check email and bvn are in payload + if (! isset($payload['order_ref']) || ! isset($payload['bvn'])) { + $this->logger->error('VirtualAccount Service::The required parameter order_ref or bvn is not present in payload'); + throw new \InvalidArgumentException('The required parameter order_ref or bvn is not present in payload'); + } + + $order_ref = $payload['order_ref']; + + $this->logger->notice("VirtualAccount Service::Updating Virtual Account. [{$order_ref}]"); + + $this->logger->notice('VirtualAccount Service::Payload Confirmed.'); + self::startRecording(); + $response = $this->request($payload, 'PUT', "{$this->name}/{$order_ref}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function delete($order_ref): \stdClass + { + $this->logger->notice("VirtualAccount Service::Updating Virtual Account. [{$order_ref}]"); + + self::startRecording(); + $response = $this->request([ 'status' => 'inactive'], 'POST', "{$this->name}/{$order_ref}"); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Service/VirtualCard.php b/src/Service/VirtualCard.php new file mode 100644 index 0000000..07e7933 --- /dev/null +++ b/src/Service/VirtualCard.php @@ -0,0 +1,153 @@ +requiredParams as $param) { + if (! $payload->has($param)) { + $this->logger->error("VirtualCard Service::The required parameter {$param} is not present in payload"); + throw new InvalidArgumentException("The required parameter {$param} is not present in payload"); + } + } + + return $payload->toArray(); + } + + /** + * @throws Exception + */ + public function create(Payload $payload): \stdClass + { + $this->logger->notice('VirtualCard Service::Creating new Virtual Card.'); + $body = $this->confirmPayload($payload); + $this->logger->notice('VirtualCard Service::Payload Confirmed.'); + self::startRecording(); + $response = $this->request($body, 'POST', $this->name); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function get(string $id): \stdClass + { + $this->logger->notice("VirtualCard Service::Retrieving Virtual Card [{$id}]."); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."/{$id}"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function list(): \stdClass + { + $this->logger->notice('VirtualCard Service::Retrieving all Virtual Cards.'); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function fund(string $id, array $data): \stdClass + { + foreach ($this->requiredParamsFund as $param) { + if (! array_key_exists($param, $data)) { + $this->logger->error("Misc Service::The following parameter is missing to check balance history: {$param}"); + throw new \InvalidArgumentException("The following parameter is missing to check balance history: {$param}"); + } + } + + $this->logger->notice("VirtualCard Service::Funding Virtual Card [{$id}]."); + self::startRecording(); + $response = $this->request($data, 'POST', $this->name."/{$id}/fund"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function withdraw(string $id, string $amount = '0'): \stdClass + { + $this->logger->notice("VirtualCard Service::Withdrawing from Virtual Card [{$id}]."); + self::startRecording(); + $response = $this->request([ 'amount' => $amount ], 'POST', $this->name."/{$id}/withdraw"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function block(string $id): \stdClass + { + $this->logger->notice("VirtualCard Service::Blocking Virtual Card [{$id}]."); + self::startRecording(); + $response = $this->request(null, 'PUT', $this->name."/{$id}/status/block"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function unblock(string $id): \stdClass + { + $this->logger->notice("VirtualCard Service::Unblocking Virtual Card [{$id}]."); + self::startRecording(); + $response = $this->request(null, 'PUT', $this->name."/{$id}/status/unblock"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function terminate(string $id): \stdClass + { + $this->logger->notice("VirtualCard Service::Terminating Virtual Card [{$id}]."); + self::startRecording(); + $response = $this->request(null, 'PUT', $this->name."/{$id}/terminate"); + self::setResponseTime(); + return $response; + } + + /** + * @throws Exception + */ + public function getTransactions(string $id, array $options = ['index' => 0, 'size' => 20]): \stdClass + { + $query = http_build_query($options); + $this->logger->notice("VirtualCard Service::Retrieving transaction for Virtual Card [{$id}]."); + self::startRecording(); + $response = $this->request(null, 'GET', $this->name."/{$id}/transactions?{$query}"); + self::setResponseTime(); + return $response; + } +} diff --git a/src/Traits/ApiOperations/Delete.php b/src/Traits/ApiOperations/Delete.php new file mode 100644 index 0000000..e3fd677 --- /dev/null +++ b/src/Traits/ApiOperations/Delete.php @@ -0,0 +1,20 @@ +secretKey; + $headers = ['Content-Type' => 'application/json', 'Authorization' => $bearerTkn]; + //$body = Body::json($data); + $path = $this->baseUrl . '/' . $this->end_point; + $response = Request::delete($path . $url, $headers); + return $response->raw_body; + } +} diff --git a/src/Traits/ApiOperations/Get.php b/src/Traits/ApiOperations/Get.php new file mode 100644 index 0000000..640d8c8 --- /dev/null +++ b/src/Traits/ApiOperations/Get.php @@ -0,0 +1,21 @@ +secretKey; + $headers = ['Content-Type' => 'application/json', 'Authorization' => $bearerTkn]; + //$body = Body::json($data); + $path = $this->baseUrl . '/' . $this->end_point; + $response = Request::get($path . $url, $headers); + return $response->raw_body; // Unparsed body + } +} diff --git a/src/Traits/ApiOperations/Post.php b/src/Traits/ApiOperations/Post.php new file mode 100644 index 0000000..801392e --- /dev/null +++ b/src/Traits/ApiOperations/Post.php @@ -0,0 +1,28 @@ + $data + * + * @throws Exception + */ + public function postURL(array $data): string + { + // make request to endpoint using unirest + $bearerTkn = 'Bearer ' . $this->config->getSecretKey(); + $headers = ['Content-Type' => 'application/json', 'Authorization' => $bearerTkn]; + $body = Body::json($data); + $url = $this->baseUrl . '/' . $this->end_point; + $response = Request::post($url, $headers, $body); + return $response->raw_body; // Unparsed body + } +} diff --git a/src/Traits/ApiOperations/Put.php b/src/Traits/ApiOperations/Put.php new file mode 100644 index 0000000..48560cb --- /dev/null +++ b/src/Traits/ApiOperations/Put.php @@ -0,0 +1,27 @@ + $data + * + * @throws Exception + */ + public function putURL(array $data): string + { + $bearerTkn = 'Bearer ' . $this->secretKey; + $headers = ['Content-Type' => 'application/json', 'Authorization' => $bearerTkn]; + $body = Body::json($data); + $url = $this->baseUrl . '/' . $this->end_point; + $response = Request::put($url, $headers, $body); + return $response->raw_body; + } +} diff --git a/src/Traits/Group/Charge.php b/src/Traits/Group/Charge.php new file mode 100644 index 0000000..b3be91e --- /dev/null +++ b/src/Traits/Group/Charge.php @@ -0,0 +1,44 @@ +logger->error('Charge Group::To verify a transaction please pass a transactionId.'); + throw new \InvalidArgumentException('To verify a transaction please pass a transactionId.'); + } + return (new Transactions($this->config))->verify($transactionId); + } + + private function checkPayloadIsValid(\Flutterwave\Payload $payload, string $criteria): bool + { + $this->logger->notice('Charge Group::Verifying Payload ...'); + //if does not payload contains $criteria :: false + if (! is_null($payload->get('otherData'))) { + $additionalData = $payload->get('otherData'); + if (! isset($additionalData[$criteria])) { + return false; + } + } else { + return false; + } + + return true; + } +} diff --git a/src/Traits/Group/Subaccount.php b/src/Traits/Group/Subaccount.php new file mode 100644 index 0000000..f1a6091 --- /dev/null +++ b/src/Traits/Group/Subaccount.php @@ -0,0 +1,9 @@ +logger->notice('Generating Reference Number....'); + if ($this->overrideTransactionReference) { + $this->txref = $this->transactionPrefix; + } else { + $this->txref = uniqid($this->transactionPrefix); + } + $this->logger->notice('Generated Reference Number....' . $this->txref); + return $this; + } + + /** + * Generates a checksum value for the information to be sent to the payment gateway + * */ + public function createCheckSum(): void + { + $this->logger->notice('Generating Checksum....'); + $options = [ + 'public_key' => self::$config->getPublicKey(), + 'amount' => $this->amount, + 'tx_ref' => $this->txref, + 'currency' => $this->currency, + 'payment_options' => 'card,mobilemoney,ussd', + 'customer' => [ + 'email' => $this->customerEmail, + 'phone_number' => $this->customerPhone, + 'name' => $this->customerFirstname . ' ' . $this->customerLastname, + ], + 'redirect_url' => $this->redirectUrl, + 'customizations' => [ + 'description' => $this->customDescription, + 'logo' => $this->customLogo, + 'title' => $this->customTitle, + ], + ]; + + ksort($options); + + // $this->transactionData = $options; + + // $hashedPayload = ''; + + // foreach($options as $key => $value){ + // $hashedPayload .= $value; + // } + + // echo $hashedPayload; + // $completeHash = $hashedPayload.$this->secretKey; + // $hash = hash('sha256', $completeHash); + + // $this->integrityHash = $hash; + // return $this; + } +} diff --git a/src/Traits/PayloadOperations/Retrieve.php b/src/Traits/PayloadOperations/Retrieve.php new file mode 100644 index 0000000..c8a497f --- /dev/null +++ b/src/Traits/PayloadOperations/Retrieve.php @@ -0,0 +1,9 @@ + AccountPayment::class, + 'ach' => AchPayment::class, + 'apple' => ApplePay::class, + 'bank-transfer' => BankTransfer::class, + 'bill' => Bill::class, + 'card' => CardPayment::class, + 'chargeback' => ChargeBacks::class, + 'Misc' => Misc::class, + 'momo' => MobileMoney::class, + 'mpesa' => Mpesa::class, + 'preauth' => Preauth::class, + 'tokenize' => TokenizedCharge::class, + 'transfer' => Transfer::class, + 'ussd' => Ussd::class, +// "paypal" => PayPal::class, +// "remita" => Remita::class, +// "voucher" => VoucherPayment::class, +]; diff --git a/src/Util/unique_bank_cases.php b/src/Util/unique_bank_cases.php new file mode 100644 index 0000000..2bec18e --- /dev/null +++ b/src/Util/unique_bank_cases.php @@ -0,0 +1,31 @@ + [ + 'requiredParams' => [ + 'passcode' => 'DDMMYYYY', + ], + ], + '033' => [ + 'requiredParams' => [ + 'bvn' => '/[0-9]{11}/g', + ], + ], +]; + +//return [ +// "zenith" => [ +// "code" => 057, +// "requiredParams" => [ +// "DOB" => "dd-mm-YYYY" +// ] +// ], +// "uba" => [ +// "code" => 033, +// "requiredParams" => [ +// "bvn" => "/[0-9]{11}/g" +// ] +// ] +//]; diff --git a/tests/AccountPaymentTest.php b/tests/AccountPaymentTest.php deleted file mode 100644 index 4140476..0000000 --- a/tests/AccountPaymentTest.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/tests/BvnTest.php b/tests/BvnTest.php deleted file mode 100644 index ea86ce6..0000000 --- a/tests/BvnTest.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/tests/CardPaymentTest.php b/tests/CardPaymentTest.php deleted file mode 100644 index 8abefe7..0000000 --- a/tests/CardPaymentTest.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/tests/PaymentPlanTest.php b/tests/PaymentPlanTest.php deleted file mode 100644 index 38c5974..0000000 --- a/tests/PaymentPlanTest.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/tests/README-TestFiles.php b/tests/README-TestFiles.php deleted file mode 100644 index 18d70cc..0000000 --- a/tests/README-TestFiles.php +++ /dev/null @@ -1,270 +0,0 @@ -"FLWPUBK-xxxxxxxxxx-X", - // //"accountbank"=> "058",// get the bank code from the bank list endpoint. - // "accountbank"=> "011", - // //"accountnumber" => "0255597451", - // "accountnumber" => "3028667062", - // "currency" => "NGN", - // "payment_type" => "account", - // "country" => "NG", - // "amount" => "10", - // "redirect_url"=> "https://google.com", - // "email" => "emereuwaonueze@gmail.com", - // "bvn" => "22389407285", - // "phonenumber" => "0902620185", - // "firstname" => "eze", - // "lastname" => "Emmanuel", - // "txRef" => "MC-".time()// merchant unique reference - // ); - // $account = new Account(); - // $result = $account->accountCharge($array); - // print_r($result) - //$result = json_decode($result, true); - //$result = $account->validateTransaction("12345"); - // $result = $account->verifyTransaction("MC-1550508976"); -// echo $result["data"]["authurl"]; - -// if($result["data"]["authurl"]){ - -// //echo'Iframe'; -// header("Location:".$result["data"]["authurl"]); -// }else{ -// print_r($result); -// } - -// require("Flutterwave-Rave-PHP-SDK/lib/MobileMoney.php"); -// use Flutterwave\MobileMoney; - -// $array = array( -// "PBFPubKey" =>"FLWPUBK-xxxxxxxxxx-X", -// "currency"=> "GHS", -// "payment_type" => "mobilemoneygh", -// "country" => "GH", -// "amount" => "10", -// "email" => "eze@gmail.com", -// "phonenumber"=> "054709929220", -// "network"=> "MTN", -// "firstname"=> "eze", -// "lastname"=> "emmanuel", -// "voucher"=> "128373", // only needed for Vodafone users. -// "IP"=> "355426087298442", -// "txRef"=> "MC-123456789", -// "orderRef"=> "MC_123456789", -// "is_mobile_money_gh"=> 1, -// "redirect_url"=> "https://rave-webhook.herokuapp.com/receivepayment", -// "device_fingerprint"=> "69e6b7f0b72037aa8428b70fbe03986c" - -// ); -// $mobilemoney = new MobileMoney(); -// $result = $mobilemoney->mobilemoney($array); -// //$result = json_decode($result, true); -// //$result = $account->validateTransaction("12345"); -// // $result = $account->verifyTransaction("MC-1550508976"); -// print_r($result); - -// require("Flutterwave-Rave-PHP-SDK/lib/VirtualCards.php"); -// use Flutterwave\VirtualCard; - -// $array = array( -// "secret_key"=>"FLWSECK-xxxxxxxxxx-X", -// "currency"=> "NGN", -// "amount"=>"200", -// "billing_name"=> "Mohammed Lawal", -// "billing_address"=>"DREAM BOULEVARD", -// "billing_city"=> "ADYEN", -// "billing_state"=>"NEW LANGE", -// "billing_postal_code"=> "293094", -// "billing_country"=> "US" -// ); -// $virtualCard = new VirtualCard(); -// $result = $virtualCard->create($array); -// print_r($result); - -// require("Flutterwave-Rave-PHP-SDK/lib/VirtualCards.php"); -// use Flutterwave\VirtualCard; - -// $array = array( -// "FromDate"=> "2019-02-13", -// "ToDate"=> "2019-12-21", -// "PageIndex"=> 0, -// "PageSize"=> 20, -// "CardId"=> "20975b22-8219-4b18-92d5-9e19c5890497 ", -// "secret_key"=>"FLWSECK-xxxxxxxxxx-X", -// // "id"=> "20975b22-8219-4b18-92d5-9e19c5890497", -// // "amount"=> "200", -// // "debit_currency"=> "NGN", -// ); -// $virtualCard = new VirtualCard(); -// $result = $virtualCard->transactions($array); -// print_r($result); - - -// require("Flutterwave-Rave-PHP-SDK/lib/CardPayment.php"); -// use Flutterwave\Card; -// $array = array( -// "PBFPubKey" => "FLWPUBK-xxxxxxxxxx-X", -// "cardno" =>"5438898014560229", -// "cvv" => "564", -// "expirymonth"=> "10", -// "expiryyear"=> "20", -// "currency"=> "NGN", -// "country"=> "NG", -// "amount"=> "2000", -// "pin"=>"3310", -// "payment_plan"=> "987", -// "email"=> "ezechukwu1995@gmail.com", -// "phonenumber"=> "0902620185", -// "firstname"=> "Eze", -// "lastname"=> "Emmanuel", -// "IP"=> "355426087298442", -// "txRef"=>"MC-".time(),// your unique merchant reference -// "meta"=>["metaname"=> "Rave", "metavalue"=>"123949494DC"], -// "redirect_url"=>"https://rave-webhook.herokuapp.com/receivepayment", -// "device_fingerprint"=> "69e6b7f0b72037aa8428b70fbe03986c" -// ); -// $card = new Card(); -//$result = $card->cardCharge($array); - - -//$array["suggested_auth"] = "PIN"; - - // // $array["billingzip"] = "07205"; - // // $array["billingcity"] = "Hillside"; - // // $array["billingaddress"] = "470 Mundet PI"; - // // $array["billingstate"] = "NJ"; - // // $array["billingcountry"] = "US"; - -//$result = $card->cardCharge($array); -//$result = $card->validateTransaction("12345"); -//$result = $card->verifyTransaction("MC-1552495607"); -print_r($result); - - - -// require("Flutterwave-Rave-PHP-SDK/lib/Bvn.php"); -// use Flutterwave\Bvn; -// $bvn = new Bvn(); -// $result = $bvn->verifyBVN("123456789"); -// print_r($result); - - -// require("Flutterwave-Rave-PHP-SDK/lib/PaymentPlan.php"); -// use Flutterwave\PaymentPlan; - -// $array = array( -// "amount" => "2000", -// "name"=> "The Premium Plan", -// "interval"=> "monthly", -// "duration"=> "12", -// "seckey" => "FLWSECK-xxxxxxxxxx-X" -// ); - -// $plan = new PaymentPlan(); -// $result = $plan->createPlan($array); -// print_r($result); - - -// require("Flutterwave-Rave-PHP-SDK/lib/Subaccount.php"); -// use Flutterwave\Subaccount; - -// $array = array( -// "account_bank"=>"044", -// "account_number"=> "0690000030", -// "business_name"=> "JK Services", -// "business_email"=> "jke@services.com", -// "business_contact"=> "Seun Alade", -// "business_contact_mobile"=> "090890382", -// "business_mobile"=> "09087930450", -// "meta" => ["metaname"=> "MarketplaceID", "metavalue"=>"ggs-920900"], -// "seckey"=> "FLWSECK-c789df9e4953611f46cc13126e84f006-X" -// ); - -// $subaccount = new Subaccount(); -// $result = $subaccount->subaccount($array); -// print_r($result); - - -// require("Flutterwave-Rave-PHP-SDK/lib/Recipient.php"); -// use Flutterwave\Recipient; - -// $array = array( -// "account_number"=>"0690000030", -// "account_bank"=>"044", -// "seckey"=>"FLWSECK-xxxxxxxxxx-X" -// ); - -// $recipient = new Recipient(); -// $result = $recipient->recipient($array); -// print_r($result); - -// require("Flutterwave-Rave-PHP-SDK/lib/Refund.php"); -// use Flutterwave\Refund; - -// $array = array( -// "ref"=>"ACHG-1540381755976", -// "seckey"=>"FLWSECK-xxxxxxxxxx-X" -// ); - -// $refund = new Refund(); -// $result = $refund->refund($array); -// print_r($result); - -// require("Flutterwave-Rave-PHP-SDK/lib/Subscription.php"); -// use Flutterwave\Subscription; -// $id = 406925; -// $subscription = new Subscription(); -// $result = $subscription->fetchSubscriptionById($id); -// print_r($result); - -// require("Flutterwave-Rave-PHP-SDK/lib/Subscription.php"); -// use Flutterwave\Subscription; -// $email = "emereuwaonueze@gmail.com"; -// $subscription = new Subscription(); -// $result = $subscription->fetchSubscriptionByEmail($email); -// print_r($result); - -// require("Flutterwave-Rave-PHP-SDK/lib/Subscription.php"); -// use Flutterwave\Subscription; -// $id = 406925; -// $subscription = new Subscription(); -// $result = $subscription->activateSubscription($id); -// print_r($result); - - -// require("Flutterwave-Rave-PHP-SDK/lib/Subscription.php"); -// use Flutterwave\Subscription; -// $id = 406925; -// $subscription = new Subscription(); -// $result = $subscription->cancelSubscription($id); -// print_r($result); - -// require("Flutterwave-Rave-PHP-SDK/lib/TransactionVerification.php"); -// use Flutterwave\TransactionVerification; - -// $verify = new TransactionVerification("FLWPUBK-xxxxxxxxxx-X","FLWSECK-xxxxxxxxxx-X","staging"); -// $result = $verify->verifyTransaction(); -// print_r($result); - -// require("Flutterwave-Rave-PHP-SDK/lib/Transfer.php"); -// use Flutterwave\Transfer; - -// $array = array( -// "account_bank"=>"044", -// "account_number"=> "0690000044", -// "amount"=> "500", -// "seckey"=>"FLWSECK-xxxxxxxxxx-X", -// "narration"=> "New transfer", -// "currency"=>"NGN", -// "reference"=> "mk-".time() -// ); - -// $transfer = new Transfer(); -// $result = $transfer->singleTransfer($array); -// print_r($result); - -?> diff --git a/tests/RecipientTest.php b/tests/RecipientTest.php deleted file mode 100644 index d26bd84..0000000 --- a/tests/RecipientTest.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/tests/RefundTest.php b/tests/RefundTest.php deleted file mode 100644 index 63e7bc0..0000000 --- a/tests/RefundTest.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/library/Otp.php b/tests/Resources/Account/account-payment-failed.json similarity index 100% rename from library/Otp.php rename to tests/Resources/Account/account-payment-failed.json diff --git a/playground/uber/assets/css/index.scss b/tests/Resources/Account/account-payment-success.json similarity index 100% rename from playground/uber/assets/css/index.scss rename to tests/Resources/Account/account-payment-success.json diff --git a/tests/Resources/Ach/ach-payment-failed.json b/tests/Resources/Ach/ach-payment-failed.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Ach/ach-payment-success.json b/tests/Resources/Ach/ach-payment-success.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/ApplePay/apple-payment-failed.json b/tests/Resources/ApplePay/apple-payment-failed.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/ApplePay/apple-payment-success.json b/tests/Resources/ApplePay/apple-payment-success.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Card/card-payment-failed.json b/tests/Resources/Card/card-payment-failed.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Card/card-payment-success.json b/tests/Resources/Card/card-payment-success.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Card/successful_payment.json b/tests/Resources/Card/successful_payment.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Momo/momo-payment-failed.json b/tests/Resources/Momo/momo-payment-failed.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Momo/momo-payment-success.json b/tests/Resources/Momo/momo-payment-success.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Mpesa/mpesa-payment-failed.json b/tests/Resources/Mpesa/mpesa-payment-failed.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Mpesa/mpesa-payment-success.json b/tests/Resources/Mpesa/mpesa-payment-success.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Ussd/ussd-payment-failed.json b/tests/Resources/Ussd/ussd-payment-failed.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Ussd/ussd-payment-success.json b/tests/Resources/Ussd/ussd-payment-success.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/VirtualAccount/create-virtual-account-success.json b/tests/Resources/VirtualAccount/create-virtual-account-success.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/VirtualCard/create-virtual-card-success-hook.json b/tests/Resources/VirtualCard/create-virtual-card-success-hook.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Webhook/banktransfer-payment-success-hook.json b/tests/Resources/Webhook/banktransfer-payment-success-hook.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Webhook/card-payment-success-hook.json b/tests/Resources/Webhook/card-payment-success-hook.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Webhook/transfer-payment-success-hook.json b/tests/Resources/Webhook/transfer-payment-success-hook.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Webhook/ussd-payment-success-hook.json b/tests/Resources/Webhook/ussd-payment-success-hook.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/SubaccountTest.php b/tests/SubaccountTest.php deleted file mode 100644 index 4e07991..0000000 --- a/tests/SubaccountTest.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/tests/SubscriptionTest.php b/tests/SubscriptionTest.php deleted file mode 100644 index 6321900..0000000 --- a/tests/SubscriptionTest.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/tests/TransactionVerificationTest.php b/tests/TransactionVerificationTest.php deleted file mode 100644 index f2e3bac..0000000 --- a/tests/TransactionVerificationTest.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/tests/TransferTest.php b/tests/TransferTest.php deleted file mode 100644 index 7595ddb..0000000 --- a/tests/TransferTest.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/tests/Unit/Service/AccountTest.php b/tests/Unit/Service/AccountTest.php new file mode 100644 index 0000000..d3a629c --- /dev/null +++ b/tests/Unit/Service/AccountTest.php @@ -0,0 +1,71 @@ + 2000, +// "currency" => Currency::NGN, +// "tx_ref" => uniqid().time(), +// "additionalData" => [ +// "account_details" => [ +// "account_bank" => "044", +// "account_number" => "0690000034", +// "country" => "NG" +// ] +// ], +// ]; +// +// $accountpayment = \Flutterwave\Flutterwave::create("account"); +// $customerObj = $accountpayment->customer->create([ +// "full_name" => "Temi Adekunle", +// "email" => "developers@flutterwavego.com", +// "phone" => "+2349067985861" +// ]); +// +// $data['customer'] = $customerObj; +// $payload = $accountpayment->payload->create($data); +// $this->expectException(\Exception::class); +// $result = $accountpayment->initiate($payload); +// +// //check mode returned is either OTP or Redirect +//// $this->assertTrue($result['mode'] === AuthMode::OTP || $result['mode'] === AuthMode::REDIRECT ); +// } + +// public function testInvalidParam() +// { +// $data = [ +// "amount" => 2000, +// "currency" => Currency::NGN, +// "tx_ref" => uniqid().time(), +// "additionalData" => null, +// ]; +// +// $accountpayment = \Flutterwave\Flutterwave::create("account"); +// $customerObj = $accountpayment->customer->create([ +// "full_name" => "Jake Jesulayomi Ola", +// "email" => "developers@flutterwavego.com", +// "phone" => "+2349067985861" +// ]); +// +// $data['customer'] = $customerObj; +// $payload = $accountpayment->payload->create($data); +// $this->expectException(\InvalidArgumentException::class); +// $result = $accountpayment->initiate($payload); +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/AchTest.php b/tests/Unit/Service/AchTest.php new file mode 100644 index 0000000..cd5dc79 --- /dev/null +++ b/tests/Unit/Service/AchTest.php @@ -0,0 +1,61 @@ + 2000, +// "currency" => Currency::ZAR, +// "tx_ref" => uniqid().time(), +// "redirectUrl" => "https://google.com" +// ]; +// +// $achpayment = \Flutterwave\Flutterwave::create("ach"); +// $customerObj = $achpayment->customer->create([ +// "full_name" => "Olaobaju Jesulayomi Abraham", +// "email" => "vicomma@gmail.com", +// "phone" => "+2349067985861" +// ]); +// +// $data['customer'] = $customerObj; +// $payload = $achpayment->payload->create($data); +// +// $result = $achpayment->initiate($payload); +// +// $this->assertSame(AuthMode::REDIRECT, $result['mode']); +// } + +// public function testBankPermittedToMerchant() +// { +// $data = [ +// "amount" => 2000, +// "currency" => Currency::ZAR, +// "tx_ref" => uniqid().time(), +// "redirectUrl" => "https://google.com" +// ]; +// +// $achpayment = \Flutterwave\Flutterwave::create("ach"); +// $customerObj = $achpayment->customer->create([ +// "full_name" => "Olaobaju Jesulayomi Abraham", +// "email" => "vicomma@gmail.com", +// "phone" => "+2349067985861" +// ]); +// +// $data['customer'] = $customerObj; +// $payload = $achpayment->payload->create($data); +// $this->expectExceptionMessage("This bank payment option is not permitted to the merchant"); +// $result = $achpayment->initiate($payload); +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/ApplePayTest.php b/tests/Unit/Service/ApplePayTest.php new file mode 100644 index 0000000..6c2b6d4 --- /dev/null +++ b/tests/Unit/Service/ApplePayTest.php @@ -0,0 +1,64 @@ + 2000, +// "currency" => Currency::NGN, +// "tx_ref" => uniqid().time(), +// "redirectUrl" => "https://example.com" +// ]; +// +// $applepayment = \Flutterwave\Flutterwave::create("apple"); +// $customerObj = $applepayment->customer->create([ +// "full_name" => "Olaobaju Jesulayomi Abraham", +// "email" => "vicomma@gmail.com", +// "phone" => "+2349067985861" +// ]); +// +// $data['customer'] = $customerObj; +// $payload = $applepayment->payload->create($data); +// $result = $applepayment->initiate($payload); +// +// $this->assertSame(AuthMode::REDIRECT, $result['mode']); +// } +// +// public function testInvalidParams() +// { +// $data = [ +// "amount" => 2000, +// "currency" => Currency::NGN, +// "tx_ref" => uniqid().time(), +// "redirectUrl" => "https://example.com" +// ]; +// +// $applepayment = \Flutterwave\Flutterwave::create("apple"); +// //no customer object; +// $this->expectException(\InvalidArgumentException::class); +// $payload = $applepayment->payload->create($data); +// $result = $applepayment->initiate($payload); +// } +// +// public function testEmptyParamsPassed() +// { +// $data = []; +// $applepayment = \Flutterwave\Flutterwave::create("apple"); +// $this->expectException(\InvalidArgumentException::class); +// $payload = $applepayment->payload->create($data); +// $result = $applepayment->initiate($payload); +// +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/BankTest.php b/tests/Unit/Service/BankTest.php new file mode 100644 index 0000000..141a1e0 --- /dev/null +++ b/tests/Unit/Service/BankTest.php @@ -0,0 +1,23 @@ +getByCountry("NG"); + $this->assertTrue(property_exists($response,'data') && \is_array($response->data)); + } + + public function testRetrievingBankBranches() + { + $service = new Banks(); + $response = $service->getBranches("280"); + $this->assertTrue(property_exists($response,'data') && \is_array($response->data)); + } +} \ No newline at end of file diff --git a/tests/Unit/Service/BankTransferTest.php b/tests/Unit/Service/BankTransferTest.php new file mode 100644 index 0000000..7529d6e --- /dev/null +++ b/tests/Unit/Service/BankTransferTest.php @@ -0,0 +1,40 @@ + 2000, + "currency" => Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => "https://google.com" + ]; + + $btpayment = Flutterwave::create("bank-transfer"); + $customerObj = $btpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "developers@flutterwavego.com", + "phone" => "+2349067985011" + ]); + + $data['customer'] = $customerObj; + $payload = $btpayment->payload->create($data); + $result = $btpayment->initiate($payload); + $this->assertSame(AuthMode::BANKTRANSFER, $result['mode']); + } +} \ No newline at end of file diff --git a/tests/Unit/Service/BeneficiariesTest.php b/tests/Unit/Service/BeneficiariesTest.php new file mode 100644 index 0000000..3265391 --- /dev/null +++ b/tests/Unit/Service/BeneficiariesTest.php @@ -0,0 +1,35 @@ +set("account_bank", "044"); +// $payload->set("account_number", "0690000033"); +// $payload->set("beneficiary_name", "Abraham Smith Olaolu"); +// $service = new Beneficiaries(); +// $request = $service->create($payload); +// $this->assertTrue(property_exists($request,'data') && $request->data->bank_name == "ACCESS BANK NIGERIA"); +// } + +// public function testAccountCouldNotBeResolved() +// { +// $payload = new Payload(); +// $payload->set("account_bank", "044"); +// $payload->set("account_number", "069000003400234"); +// $payload->set("beneficiary_name", "Abraham AB Olaolu"); +// $service = new Beneficiaries(); +// $this->expectException(\Exception::class); +// $request = $service->create($payload); +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/BillTest.php b/tests/Unit/Service/BillTest.php new file mode 100644 index 0000000..f51da47 --- /dev/null +++ b/tests/Unit/Service/BillTest.php @@ -0,0 +1,37 @@ +set("country", "NG"); +// $payload->set("customer", "+2349067985861"); +// $payload->set("amount", "2000"); +// $payload->set("type", "AIRTIME"); +// $payload->set("reference", "TEST_".uniqid().uniqid()); +// +// $service = new Bill(); +// $request = $service->createPayment($payload); +// $this->assertTrue(property_exists($request,'data') && $request->data->flw_ref); //tx_ref not returned on test mode +// } + + public function testMissingRequiredParam() + { + $payload = new Payload(); + $payload->set("country", "NG"); + $payload->set("customer", "+2349067985861"); + $payload->set("amount", "2000"); + + $service = new Bill(); + $this->expectException(\InvalidArgumentException::class); + $request = $service->createPayment($payload); + } +} \ No newline at end of file diff --git a/tests/Unit/Service/CardTest.php b/tests/Unit/Service/CardTest.php new file mode 100644 index 0000000..b9b0548 --- /dev/null +++ b/tests/Unit/Service/CardTest.php @@ -0,0 +1,161 @@ + 2000, + "currency" => Currency::NGN, + "tx_ref" => "TEST-".uniqid().time(), + "redirectUrl" => "https://www.example.com", + "additionalData" => [ + "subaccounts" => [ + ["id" => "RSA_345983858845935893"] + ], + "meta" => [ + "unique_id" => uniqid().uniqid() + ], + "preauthorize" => false, + "payment_plan" => null, + "card_details" => [ + "card_number" => "5531886652142950", + "cvv" => "564", + "expiry_month" => "09", + "expiry_year" => "32" + ] + ], + ]; + + $cardpayment = Flutterwave::create("card"); + $customerObj = $cardpayment->customer->create([ + "full_name" => "Olaobaju Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" + ]); + $data['customer'] = $customerObj; + $payload = $cardpayment->payload->create($data); + $result = $cardpayment->initiate($payload); + + $this->assertSame(AuthMode::PIN,$result['mode']); + } + + public function testInvalidArgumentExceptionThrowOnNoCardDetails() + { + $data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => "TEST-".uniqid().time(), + "redirectUrl" => "https://www.example.com", + "additionalData" => null, + ]; + + $cardpayment = Flutterwave::create("card"); + $customerObj = $cardpayment->customer->create([ + "full_name" => "Olaobaju Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" + ]); + $data['customer'] = $customerObj; + $payload = $cardpayment->payload->create($data); + $msg = "Card Service:Please pass card details."; + $this->expectException(\InvalidArgumentException::class); + $result = $cardpayment->initiate($payload); + } + + public function testAuthModeReturnRedirect() + { + $data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => "TEST-".uniqid().time(), + "redirectUrl" => "https://www.example.com", + "additionalData" => [ + "subaccounts" => [ + ["id" => "RSA_345983858845935893"] + ], + "meta" => [ + "unique_id" => uniqid().uniqid() + ], + "preauthorize" => false, + "payment_plan" => null, + "card_details" => [ + "card_number" => "5531886652142950", + "cvv" => "564", + "expiry_month" => "09", + "expiry_year" => "32" + ] + ], + ]; + + $cardpayment = Flutterwave::create("card"); + $customerObj = $cardpayment->customer->create([ + "full_name" => "Olaobaju Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" + ]); + $data['customer'] = $customerObj; + $payload = $cardpayment->payload->create($data); + $result = $cardpayment->initiate($payload); + $payload->set(AuthMode::PIN,"1234"); + $result = $cardpayment->initiate($payload);// with pin in payload + + $this->assertSame(AuthMode::REDIRECT, $result['mode']); + + } + + public function testAuthModeReturnAVS() + { + $data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => "TEST-".uniqid().time(), + "redirectUrl" => "https://www.example.com", + "additionalData" => [ + "subaccounts" => [ + ["id" => "RSA_345983858845935893"] + ], + "meta" => [ + "unique_id" => uniqid().uniqid() + ], + "preauthorize" => false, + "payment_plan" => null, + "card_details" => [ + "card_number" => "4556052704172643", + "cvv" => "899", + "expiry_month" => "01", + "expiry_year" => "23" + ] + ], + ]; + + $cardpayment = Flutterwave::create("card"); + $customerObj = $cardpayment->customer->create([ + "full_name" => "Olaobaju Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" + ]); + $data['customer'] = $customerObj; + $payload = $cardpayment->payload->create($data); + $result = $cardpayment->initiate($payload); + $this->assertSame(AuthMode::AVS, $result['mode']); + } + + public function testAuthModelReturnNoauth() + { + $this->assertTrue(true); + } +} \ No newline at end of file diff --git a/tests/Unit/Service/CollectionSubaccountTest.php b/tests/Unit/Service/CollectionSubaccountTest.php new file mode 100644 index 0000000..487798b --- /dev/null +++ b/tests/Unit/Service/CollectionSubaccountTest.php @@ -0,0 +1,101 @@ +set("account_bank", "044"); +// $payload->set("account_number", "06900000" . mt_rand(25, 60)); +// $payload->set("business_name", "Mean Ventures"); +// $payload->set("split_type", "percentage"); +// $payload->set("split_value", "0.5"); // 50% +// $payload->set("business_mobile", "09087930450"); +// $payload->set("business_email", "developers@flutterwavego.com"); +// $payload->set("country", "NG"); +// $service = new CollectionSubaccount(); +// $request = $service->create($payload); +// $this->assertTrue(property_exists($request,'data') && !empty($request->data->subaccount_id)); +// return $request->data->id; +// } +// +// public function testWhenSubaccountAlreadyExist() +// { +// $payload = new Payload(); +// $payload->set("account_bank", "044"); +// $payload->set("account_number", "0690000018"); +// $payload->set("business_name", "Mean Ventures"); +// $payload->set("split_type", "percentage"); +// $payload->set("split_value", "0.5"); // 50% +// $payload->set("business_mobile", "09087930450"); +// $payload->set("business_email", "developers@flutterwavego.com"); +// $payload->set("country", "NG"); +// $service = new CollectionSubaccount(); +// $this->expectException(GuzzleException::class); +// $this->expectExceptionMessage("A subaccount with the account number and bank already exists"); +// $request = $service->create($payload); +// } +// +// public function testInvalidAccountNumber() +// { +// $payload = new Payload(); +// $payload->set("account_bank", "044"); +// $payload->set("account_number", "0690000190"); +// $payload->set("business_name", "Maxi Ventures"); +// $payload->set("split_value", "0.5"); // 50% +// $payload->set("business_mobile", "09087930450"); +// $payload->set("business_email", "vicomma@gmail.com"); +// $payload->set("country", "NG"); +// $service = new CollectionSubaccount(); +// $this->expectException(\Exception::class); +// $this->expectExceptionMessage("Sorry we couldn't verify your account number kindly pass a valid account number."); +// $request = $service->create($payload); +// } +// +// public function testRetrievingCollectionSubaccountList() +// { +// $service = new CollectionSubaccount(); +// $request = $service->list(); +// +// $this->assertTrue(property_exists($request,'data') && \is_array($request->data)); +// } +// +// /** +// * @depends testCollectionSubaccountCreation +// */ +// public function testRetrievingOneSubaccount($id) +// { +// $service = new CollectionSubaccount(); +// $request = $service->get($id); +// $this->assertTrue(property_exists($request,'data') && $request->data->bank_name = "ACCESS BANK NIGERIA"); +// } +// +// /** +// * @depends testCollectionSubaccountCreation +// */ +// public function testUpdatingCollectionSubaccount($id) +// { +// $payload = new Payload(); +// $payload->set("split_value", "0.2"); +// $service = new CollectionSubaccount(); +// $request = $service->update($id, $payload); +// $this->assertTrue(property_exists($request,'data') && $request->data->bank_name = "ACCESS BANK NIGERIA"); +// } +// +// /** +// * @depends testCollectionSubaccountCreation +// */ +// public function testDeletingCollectionSubaccount($id) +// { +// $service = new CollectionSubaccount(); +// $request = $service->delete($id); +// $this->assertTrue(property_exists($request,'data') && \is_null($request->data)); +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/MiscTest.php b/tests/Unit/Service/MiscTest.php new file mode 100644 index 0000000..ca74ed8 --- /dev/null +++ b/tests/Unit/Service/MiscTest.php @@ -0,0 +1,76 @@ +getWallet(Currency::NGN); +// $this->assertTrue( +// property_exists($response, "data") && !empty($response->data->available_balance) +// ); +// } +// +// public function testRetrievingAllWallets() +// { +// $service = new Misc(); +// $response = $service->getWallets(); +// $this->assertTrue(property_exists($response, "data") && \is_array($response->data)); +// +// } +// +// public function testRetrievingBalanceHistory() +// { +// $service = new Misc(); +// $data = [ +// "from" => "2020-05-15", +// "to" => "2020-09-10", +// "currency" => Currency::NGN, +// ]; +// +// $response = $service->getBalanceHistory($data); +// $this->assertTrue( +// property_exists($response, "data") && \is_array($response->data->transactions) +// ); +// } +// +// public function testResolvingAccount() +// { +// $payload = new Payload(); +// $service = new Misc(); +// +// $payload->set("account_number","0690000033"); +// $payload->set("account_bank","044"); +// $response = $service->resolveAccount($payload); +// $this->assertTrue( +// property_exists($response, "data") && !empty($response->data->account_number) +// ); +// } + +// public function testResolvingBvn() +// { +// $service = new Misc(); +// $response = $service->resolveBvn("203004042344532"); +// $this->assertTrue( +// property_exists($response, "data") && isset($response->data->first_name) +// && isset($response->data->middle_name) && isset($response->data->last_name) +// ); +// } + +// public function testResolvingCardBin() +// { +// $service = new Misc(); +// $response = $service->resolveCardBin("539983"); +// $this->assertTrue( +// property_exists($response, "data") && !empty($response->data->issuing_country) +// && $response->data->card_type == "MASTERCARD" +// ); +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/MomoTest.php b/tests/Unit/Service/MomoTest.php new file mode 100644 index 0000000..8248f3d --- /dev/null +++ b/tests/Unit/Service/MomoTest.php @@ -0,0 +1,179 @@ + 2000, + "currency" => Currency::RWF, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "network" => "MTN", + ] + ]; + + $momopayment = \Flutterwave\Flutterwave::create("momo"); + $customerObj = $momopayment->customer->create([ + "full_name" => "Abiodun Abrahams", + "email" => "developers@flutterwavego.com", + "phone" => "+2349067982061" + ]); + + $data['customer'] = $customerObj; + + $payload = $momopayment->payload->create($data); + + $result = $momopayment->initiate($payload); + + $this->assertSame(AuthMode::REDIRECT,$result['mode']); + } + + public function testAuthModeGhanaRedirect(){ + $data = [ + "amount" => 2000, + "currency" => Currency::GHS, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "network" => "MTN", + ] + ]; + + $momopayment = \Flutterwave\Flutterwave::create("momo"); + $customerObj = $momopayment->customer->create([ + "full_name" => "Akin Temilade", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $momopayment->payload->create($data); + + $result = $momopayment->initiate($payload); + + $this->assertSame(AuthMode::REDIRECT,$result['mode']); + } + + public function testAuthModeUgandaRedirect(){ + $data = [ + "amount" => 2000, + "currency" => Currency::UGX, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "network" => "MTN", + ] + ]; + + $momopayment = \Flutterwave\Flutterwave::create("momo"); + $customerObj = $momopayment->customer->create([ + "full_name" => "Ali Bolaji", + "email" => "developers@flutterwavego.com", + "phone" => "+2349067901861" + ]); + + $data['customer'] = $customerObj; + + $payload = $momopayment->payload->create($data); + + $result = $momopayment->initiate($payload); + + $this->assertSame(AuthMode::REDIRECT,$result['mode']); + } + +// public function testAuthModeFrancoCallback(){ +// $data = [ +// "amount" => 2000, +// "currency" => Currency::XAF, +// "tx_ref" => uniqid().time(), +// "redirectUrl" => null, +// "additionalData" => [ +// "network" => "MTN", +// "country" => "CM" +// ] +// ]; +// +// $momopayment = \Flutterwave\Flutterwave::create("momo"); +// $customerObj = $momopayment->customer->create([ +// "full_name" => "Truce Jake", +// "email" => "developers@flutterwavego.com", +// "phone" => "+2349067900861" +// ]); +// +// $data['customer'] = $customerObj; +// +// $payload = $momopayment->payload->create($data); +// +// $result = $momopayment->initiate($payload); +// +// $this->assertSame(AuthMode::CALLBACK,$result['mode']); +// } + +// public function testAuthModeZambiaRedirect(){ +// $data = [ +// "amount" => 2000, +// "currency" => Currency::ZMW, +// "tx_ref" => uniqid().time(), +// "redirectUrl" => null, +// "additionalData" => [ +// "network" => "MTN", +// ] +// ]; +// +// $momopayment = \Flutterwave\Flutterwave::create("momo"); +// $customerObj = $momopayment->customer->create([ +// "full_name" => "Flutterwave Developers", +// "email" => "developers@flutterwavego.com", +// "phone" => "+2349067985001" +// ]); +// +// $data['customer'] = $customerObj; +// +// $payload = $momopayment->payload->create($data); +// +// $result = $momopayment->initiate($payload); +// +// $this->assertSame(AuthMode::REDIRECT,$result['mode']); +// } + + public function testInvalidCurrency() + { + $data = [ + "amount" => 2000, + "currency" => Currency::XOF, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "network" => "MTN", + ] + ]; + + $momopayment = \Flutterwave\Flutterwave::create("momo"); + $customerObj = $momopayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $momopayment->payload->create($data); + $this->expectException(\InvalidArgumentException::class); + $result = $momopayment->initiate($payload); + } +} \ No newline at end of file diff --git a/tests/Unit/Service/PaymentPlanTest.php b/tests/Unit/Service/PaymentPlanTest.php new file mode 100644 index 0000000..19b63d5 --- /dev/null +++ b/tests/Unit/Service/PaymentPlanTest.php @@ -0,0 +1,68 @@ +set("amount", "1600"); + $payload->set("name", "PHPSDK Test Plan"); + $payload->set("interval", "monthly"); + $payload->set("duration", "1"); + + $service = new PaymentPlan(); + + $request = $service->create($payload); + + $this->assertTrue(property_exists($request,'data') && !empty($request->data->id)); + + return $request->data->id; + } + + /** + * @depends testPlanCreation + */ + public function testRetrievingPlan($id) + { + $service = new PaymentPlan(); + $request = $service->get($id); + $this->assertTrue(property_exists($request,'data') && !empty($request->data->id)); + } + + public function testRetrievingPlans() + { + $service = new PaymentPlan(); + $request = $service->list(); + $this->assertTrue(property_exists($request,'data') && \is_array($request->data)); + } + + /** + * @depends testPlanCreation + */ + public function testUpdatingPlan($id) + { + $service = new PaymentPlan(); + $payload = new Payload(); + $payload->set("amount","600"); + $payload->set("status", "active"); + $request = $service->update($id, $payload); + $this->assertTrue(property_exists($request,'data') && isset($request->data->id)); + } + + /** + * @depends testPlanCreation + */ + public function testCancelingPlan($id) + { + $service = new PaymentPlan(); + $request = $service->cancel($id); + $this->assertTrue(property_exists($request,'data') && $request->data->status == "cancelled"); + } +} \ No newline at end of file diff --git a/tests/Unit/Service/PayoutSubaccountTest.php b/tests/Unit/Service/PayoutSubaccountTest.php new file mode 100644 index 0000000..e986335 --- /dev/null +++ b/tests/Unit/Service/PayoutSubaccountTest.php @@ -0,0 +1,96 @@ +set("fullname","PHP Person"); +// $customer->set("email","cornelius@flutterwavego.com"); +// $customer->set("phone_number","+2348065007910"); +// $payload = new Payload(); +// $payload->set("country", "NG"); +// $payload->set("customer", $customer); +// $service = new PayoutSubaccount(); +// $request = $service->create($payload); +// $this->assertTrue(property_exists($request,'data') && !empty($request->data->bank_code)); +// +// return $request->data->account_reference; +// } +// +// public function testRetrievingListOfPayoutSubaccounts() +// { +// $service = new PayoutSubaccount(); +// $request = $service->list(); +// $this->assertTrue(property_exists($request,'data') && \is_array($request->data)); +// } +// +// /** +// * @depends testPayoutSuccountCreation +// */ +// public function testRetrievingPayoutSubaccount($account_reference) +// { +// $service = new PayoutSubaccount(); +// $request = $service->get($account_reference); +// $this->assertTrue(property_exists($request,'data') && !empty($request->data->bank_code)); +// } +// +// /** +// * @depends testPayoutSuccountCreation +// */ +// public function testUpdatingPayoutSubaccount($account_reference) +// { +// $payload = new Payload(); +// $payload->set("account_name","Aramide Smith"); +// $payload->set("mobilenumber","+2348065007080"); +// $payload->set("email","developers@flutterwavego.com"); +// $payload->set("country","NG"); +// +// $service = new PayoutSubaccount(); +// $request = $service->update($account_reference, $payload); +// $this->assertTrue(property_exists($request,'data') && !empty($request->data->bank_code)); +// } +// +// /** +// * @depends testPayoutSuccountCreation +// */ +// public function testFetchingAvailableBalanceOfPayoutSubaccount($account_reference) +// { +// $service = new PayoutSubaccount(); +// $request = $service->fetchAvailableBalance($account_reference, "USD"); +// $this->assertTrue(property_exists($request,'data') && !empty($request->data->available_balance)); +// } +// +// /** +// * @depends testPayoutSuccountCreation +// */ +// public function testFetchingStaticVirtualAccountOfPayoutSubaccounts($account_reference) +// { +// $service = new PayoutSubaccount(); +// $request = $service->fetchStaticVirtualAccounts($account_reference, "USD"); +// $this->assertTrue(property_exists($request,'data') && !empty($request->data->static_account)); +// } + +// public function testInvalidAccountReference() +// { +// $payload = new Payload(); +// $payload->set("account_name","Aramide Smith"); +// $payload->set("mobilenumber","+1409340265"); +// $payload->set("email","arasmith676@yahoo.com"); +// $payload->set("country","NG"); +// +// $service = new PayoutSubaccount(); +// $this->expectException(\Exception::class); +// $this->expectExceptionMessage("Account reference is Invalid"); +// $request = $service->update("PSA15FAF664D63870782", $payload); +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/SettlementTest.php b/tests/Unit/Service/SettlementTest.php new file mode 100644 index 0000000..137afe9 --- /dev/null +++ b/tests/Unit/Service/SettlementTest.php @@ -0,0 +1,23 @@ +list(); +// $this->assertTrue(property_exists($response,'data') && \is_array($response->data)); +// } +// +// public function testRetrievingASettlement() +// { +// $service = new Settlement(); +// $response = $service->get("41748"); +// $this->assertTrue(property_exists($response,'data') && isset($response->data->status)); +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/SubscriptionTest.php b/tests/Unit/Service/SubscriptionTest.php new file mode 100644 index 0000000..db2111c --- /dev/null +++ b/tests/Unit/Service/SubscriptionTest.php @@ -0,0 +1,23 @@ +list(); +// $this->assertTrue(property_exists($response,'data') && \is_array($response->data)); +// } +// +// public function testActivatingSubscriptions() +// { +// $service = new Subscription(); +// $response = $service->activate("4147"); +// $this->assertTrue($response->message === "Subscription activated"); +// } +} \ No newline at end of file diff --git a/tests/Unit/Service/TransactionTest.php b/tests/Unit/Service/TransactionTest.php new file mode 100644 index 0000000..f8e8ebe --- /dev/null +++ b/tests/Unit/Service/TransactionTest.php @@ -0,0 +1,10 @@ + 2000, + "currency" => Currency::NGN, + "tx_ref" => "TEST-".uniqid().time()."_PMCKDU_1", + "redirectUrl" => "https://www.example.com", + "additionalData" => [ + "account_details" => [ + "account_bank" => "044", + "account_number" => "0690000032", + "amount" => "2000", + "callback" => null + ], + "narration" => "Good Times in the making", + ], + ]; + + $service = new Transfer(); + $customerObj = $service->customer->create([ + "full_name" => "Olaobaju Abraham", + "email" => "olaobajua@gmail.com", + "phone" => "+2349067985861" + ]); + $data['customer'] = $customerObj; + $payload = $service->payload->create($data); + $response = $service->initiate($payload); + + $this->assertTrue(isset($response['bank_code']) && $response['status'] == "NEW"); + } +} \ No newline at end of file diff --git a/tests/Unit/Service/UssdTest.php b/tests/Unit/Service/UssdTest.php new file mode 100644 index 0000000..0d7d812 --- /dev/null +++ b/tests/Unit/Service/UssdTest.php @@ -0,0 +1,96 @@ + 2000, +// "currency" => Currency::NGN, +// "tx_ref" => uniqid().time(), +// "redirectUrl" => null, +// "additionalData" => [ +// "account_bank" => "044", +// "account_number" => "000000000000" +// ] +// ]; +// +// $ussdpayment = \Flutterwave\Flutterwave::create("ussd"); +// +// $customerObj = $ussdpayment->customer->create([ +// "full_name" => "Olaobaju Jesulayomi Abraham", +// "email" => "vicomma@gmail.com", +// "phone" => "+2349067985861" +// ]); +// +// $data['customer'] = $customerObj; +// +// $payload = $ussdpayment->payload->create($data); +// +// $result = $ussdpayment->initiate($payload); +// +// $this->assertSame(AuthMode::USSD,$result['mode']); +// } + + public function testInvalidArgument() + { + $data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => null + ]; + + $ussdpayment = \Flutterwave\Flutterwave::create("ussd"); + + $customerObj = $ussdpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + + $payload = $ussdpayment->payload->create($data); + $this->expectException(\InvalidArgumentException::class); + $result = $ussdpayment->initiate($payload); + } + + public function testInvalidBank() + { + $data = [ + "amount" => 2000, + "currency" => Currency::NGN, + "tx_ref" => uniqid().time(), + "redirectUrl" => null, + "additionalData" => [ + "account_bank" => "204", + "account_number" => "000000000000" + ] + ]; + + $ussdpayment = \Flutterwave\Flutterwave::create("ussd"); + $customerObj = $ussdpayment->customer->create([ + "full_name" => "Olaobaju Jesulayomi Abraham", + "email" => "vicomma@gmail.com", + "phone" => "+2349067985861" + ]); + + $data['customer'] = $customerObj; + $payload = $ussdpayment->payload->create($data); + $this->expectExceptionMessage("USSD Service: We do not support your bank. please kindly use another."); + $result = $ussdpayment->initiate($payload); + } +} \ No newline at end of file diff --git a/tests/Unit/Service/VirtualAccountTest.php b/tests/Unit/Service/VirtualAccountTest.php new file mode 100644 index 0000000..4f69947 --- /dev/null +++ b/tests/Unit/Service/VirtualAccountTest.php @@ -0,0 +1,98 @@ + "kennyio@gmail.com", + "bvn" => "12345678901", + ]; + + $response = $service->create($payload); + $this->assertTrue(property_exists( + $response, "data") && !empty($response->data->order_ref) && isset($response->data->account_number) + ); + + return $response->data->order_ref; + } + + public function testRetrievingBulkVirtualAccounts() + { + $service = new VirtualAccount(); + + $change = mt_rand(1, 1000); + + $payload = [ + "accounts" => 5, + "email" => "kennyio+$change@gmail.com", + "tx_ref" => "kenny-".time(), // This is a transaction reference that would be returned each time a transfer is done to the account + ]; + + $response = $service->createBulk($payload); + $this->assertTrue( + property_exists( + $response, "data") && !empty($response->data->batch_id) && $response->data->response_code === "02" + ); + } + + /** + * @depends testVirtualAccountCreation + */ + public function testRetrievingVirtualAccount(string $order_ref) + { + $service = new VirtualAccount(); + + // $order_ref - This is the order reference returned on the virtual account number creation + + $response = $service->get($order_ref); + + $this->assertTrue(property_exists( + $response, "data") && !empty($response->data->account_number) && $response->data->response_code === "02" + ); + } + +// /** +// * @depends testVirtualAccountCreation +// */ +// public function testUpdatingVirtualAccount(string $order_ref) +// { +// $service = new VirtualAccount(); +// +// $payload = [ +// "order_ref" => $order_ref, +// "bvn" => "12345678901", +// ]; +// +// $response = $service->update($payload); +// $this->assertTrue(property_exists( +// $response, "data") && $response->status === "success" +// ); +// } +// +// /** +// * @depends testVirtualAccountCreation +// */ +// public function testDeletingVirtualAccount(string $order_ref) +// { +// $service = new VirtualAccount(); +// +// // $order_ref - This is the order reference returned on the virtual account number creation +// $response = $service->delete($order_ref); +// +// $this->assertTrue(property_exists( +// $response, "status") && $response->status === "00" && $response->status_desc === "Deactivated successfully" +// ); +// } + + +} diff --git a/tests/Unit/Service/VirtualCardTest.php b/tests/Unit/Service/VirtualCardTest.php new file mode 100644 index 0000000..a2d6e8c --- /dev/null +++ b/tests/Unit/Service/VirtualCardTest.php @@ -0,0 +1,117 @@ +set("first_name","PHP"); +// $payload->set("last_name","SDK"); +// $payload->set("date_of_birth","1994-03-01"); +// $payload->set("title","Mr"); +// $payload->set("gender","M"); //M or F +// $payload->set("email","developers@flutterwavego.com"); +// $payload->set("currency", Currency::NGN); +// $payload->set("amount", "5000"); +// $payload->set("debit_currency", Currency::NGN); +// $payload->set("phone", "+234505394568"); +// $payload->set("billing_name", "Abraham Ola"); +// $payload->set("firstname", "Abraham"); +// $response = $service->create($payload); +// $this->assertTrue(property_exists( +// $response, "data") && !empty($response->data->id) && isset($response->data->card_pan) +// ); +// +// return $response->data->id; +// } +// +// public function testRetrievingAllVirtualCards() +// { +// $service = new VirtualCard(); +// $request = $service->list(); +// $this->assertTrue(property_exists($request,'data') && \is_array($request->data)); +// } +// +// /** +// * @depends testVirtualCardCreation +// */ +// public function testRetrievingVirtualCard(string $id) +// { +// $service = new VirtualCard(); +// $request = $service->get($id); +// $this->assertTrue(property_exists($request,'data') && !empty($request->data->id)); +// } +// +// +// /** +// * @depends testVirtualCardCreation +// */ +// public function testVirtualCardFund(string $id) +// { +// $data = [ +// "amount"=>"3500", +// "debit_currency" => Currency::NGN +// ]; +// $service = new VirtualCard(); +// $request = $service->fund($id, $data); +// $this->assertTrue(property_exists($request,'data') && $request->message == "Card funded successfully"); +// } +// +// /** +// * @depends testVirtualCardCreation +// */ +// public function testVirtualCardWithdraw(string $id) +// { +// $card_id = $id; +// $amount = "3500"; +// $service = new VirtualCard(); +// $request = $service->withdraw($card_id,$amount); +// $this->assertTrue(property_exists($request,'data')); +// } +// +//// /** +//// * @depends testVirtualCardCreation +//// */ +//// public function testVirtualCardBlock(string $id) +//// { +//// $service = new VirtualCard(); +//// $request = $service->block($id); +//// $this->assertTrue(property_exists($request,'data') && $request->message == "Card blocked successfully"); +//// } +// +// /** +// * @depends testVirtualCardCreation +// */ +// public function testVirtualCardTerminate(string $id) +// { +// $service = new VirtualCard(); +// $request = $service->terminate($id); +// $this->assertTrue(property_exists($request,'data') && $request->message == "Card terminated successfully"); +// } +// +// /** +// * @depends testVirtualCardCreation +// */ +// public function testRetrievingCardTransactions(string $id) +// { +// $data = [ +// "from" => "2019-01-01", +// "to" => "2020-01-13", +// "index" => "2", +// "size" => "3" +// ]; +// +// $service = new VirtualCard(); +// $request = $service->getTransactions($id, $data); +// $this->assertTrue(property_exists($request,'data') && $request->message == "Card transactions fetched successfully"); +// } +} \ No newline at end of file diff --git a/tests/UssdTest.php b/tests/UssdTest.php deleted file mode 100644 index 772353e..0000000 --- a/tests/UssdTest.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/tests/VirtualCardTest.php b/tests/VirtualCardTest.php deleted file mode 100644 index 6b5f658..0000000 --- a/tests/VirtualCardTest.php +++ /dev/null @@ -1,44 +0,0 @@ -"FLWSECK-xxxxxxxxxxxxxxxxxxxxx-X", - "currency"=> "NGN", - "amount"=>"200", - "billing_name"=> "Mohammed Lawal", - "billing_address"=>"DREAM BOULEVARD", - "billing_city"=> "ADYEN", - "billing_state"=>"NEW LANGE", - "billing_postal_code"=> "293094", - "billing_country"=> "US" - ); - $double = Mockery::mock(virtualCardAPI::class); - $virtualCard = new VirtualCard(); - $result = $virtualCard->create($array); - $this->assertInstanceOf($double->shouldReceive('create')->with($array)->andReturn(array()), []); - - } - -} - -?> diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..36de571 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,25 @@ +