From fb959c1487b3f0b7d9ab11493a3d51a8aaebdfd0 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 25 Feb 2016 10:32:31 +0200 Subject: [PATCH 1/7] Refinements to reports --- app/Http/Controllers/ReportController.php | 2 +- resources/views/reports/chart_builder.blade.php | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index f6aa72bf53..690775318a 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -292,7 +292,7 @@ class ReportController extends BaseController foreach ($taxes as $tax) { $displayData[] = [ $tax['name'], - $tax['rate'], + $tax['rate'] . '%', $account->formatMoney($tax['amount'], $client), $account->formatMoney($tax['paid'], $client) ]; diff --git a/resources/views/reports/chart_builder.blade.php b/resources/views/reports/chart_builder.blade.php index 5095c097f7..defe7405e0 100644 --- a/resources/views/reports/chart_builder.blade.php +++ b/resources/views/reports/chart_builder.blade.php @@ -87,13 +87,19 @@ - @foreach ($displayData as $record) + @if (count($displayData)) + @foreach ($displayData as $record) + + @foreach ($record as $field) + {!! $field !!} + @endforeach + + @endforeach + @else - @foreach ($record as $field) - {!! $field !!} - @endforeach + {{ trans('texts.empty_table') }} - @endforeach + @endif From 01f9634237c1309580a68474393efae42703240c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 25 Feb 2016 11:25:07 +0200 Subject: [PATCH 2/7] Improvements to data export --- app/Http/Controllers/ExportController.php | 26 ++++++++++++----------- app/Models/Invoice.php | 5 +++++ app/Ninja/Presenters/InvoicePresenter.php | 22 ++++++++++++++++--- resources/lang/en/texts.php | 2 +- resources/views/export.blade.php | 5 +++++ resources/views/export/invoices.blade.php | 2 ++ 6 files changed, 46 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index 540e38d972..a7f5db4b57 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -109,8 +109,7 @@ class ExportController extends BaseController if ($request->input(ENTITY_CLIENT)) { $data['clients'] = Client::scope() ->with('user', 'contacts', 'country') - ->withTrashed() - ->where('is_deleted', '=', false) + ->withArchived() ->get(); $data['contacts'] = Contact::scope() @@ -126,33 +125,36 @@ class ExportController extends BaseController if ($request->input(ENTITY_TASK)) { $data['tasks'] = Task::scope() ->with('user', 'client.contacts') - ->withTrashed() - ->where('is_deleted', '=', false) + ->withArchived() ->get(); } if ($request->input(ENTITY_INVOICE)) { $data['invoices'] = Invoice::scope() ->with('user', 'client.contacts', 'invoice_status') - ->withTrashed() - ->where('is_deleted', '=', false) + ->withArchived() ->where('is_quote', '=', false) ->where('is_recurring', '=', false) ->get(); $data['quotes'] = Invoice::scope() ->with('user', 'client.contacts', 'invoice_status') - ->withTrashed() - ->where('is_deleted', '=', false) + ->withArchived() ->where('is_quote', '=', true) ->where('is_recurring', '=', false) ->get(); + + $data['recurringInvoices'] = Invoice::scope() + ->with('user', 'client.contacts', 'invoice_status', 'frequency') + ->withArchived() + ->where('is_quote', '=', false) + ->where('is_recurring', '=', true) + ->get(); } if ($request->input(ENTITY_PAYMENT)) { $data['payments'] = Payment::scope() - ->withTrashed() - ->where('is_deleted', '=', false) + ->withArchived() ->with('user', 'client.contacts', 'payment_type', 'invoice', 'account_gateway.gateway') ->get(); } @@ -161,14 +163,14 @@ class ExportController extends BaseController if ($request->input(ENTITY_VENDOR)) { $data['clients'] = Vendor::scope() ->with('user', 'vendorcontacts', 'country') - ->withTrashed() - ->where('is_deleted', '=', false) + ->withArchived() ->get(); $data['vendor_contacts'] = VendorContact::scope() ->with('user', 'vendor.contacts') ->withTrashed() ->get(); + /* $data['expenses'] = Credit::scope() ->with('user', 'client.contacts') diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 835de501c6..e60a06f8d4 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -200,6 +200,11 @@ class Invoice extends EntityModel implements BalanceAffecting return $this->hasMany('App\Models\Invoice', 'recurring_invoice_id'); } + public function frequency() + { + return $this->belongsTo('App\Models\Frequency'); + } + public function invitations() { return $this->hasMany('App\Models\Invitation')->orderBy('invitations.contact_id'); diff --git a/app/Ninja/Presenters/InvoicePresenter.php b/app/Ninja/Presenters/InvoicePresenter.php index 2bab049d2a..0daa733123 100644 --- a/app/Ninja/Presenters/InvoicePresenter.php +++ b/app/Ninja/Presenters/InvoicePresenter.php @@ -40,9 +40,15 @@ class InvoicePresenter extends Presenter { public function status() { - $status = $this->entity->invoice_status ? $this->entity->invoice_status->name : 'draft'; - $status = strtolower($status); - return trans("texts.status_{$status}"); + if ($this->entity->is_deleted) { + return trans('texts.deleted'); + } elseif ($this->entity->trashed()) { + return trans('texts.archived'); + } else { + $status = $this->entity->invoice_status ? $this->entity->invoice_status->name : 'draft'; + $status = strtolower($status); + return trans("texts.status_{$status}"); + } } public function invoice_date() @@ -55,9 +61,19 @@ class InvoicePresenter extends Presenter { return Utils::fromSqlDate($this->entity->due_date); } + public function frequency() + { + return $this->entity->frequency ? $this->entity->frequency->name : ''; + } + public function link() { return link_to('/invoices/' . $this->entity->public_id, $this->entity->invoice_number); } + public function email() + { + $client = $this->entity->client; + return count($client->contacts) ? $client->contacts[0]->email : ''; + } } \ No newline at end of file diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index d130919802..d98821b83f 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -81,7 +81,7 @@ $LANG = array( 'company_details' => 'Company Details', 'online_payments' => 'Online Payments', 'notifications' => 'Email Notifications', - 'import_export' => 'Import/Export/Cancel', + 'import_export' => 'Import | Export | Cancel', 'done' => 'Done', 'save' => 'Save', 'create' => 'Create', diff --git a/resources/views/export.blade.php b/resources/views/export.blade.php index f2fa8dbbe7..6625dee11c 100644 --- a/resources/views/export.blade.php +++ b/resources/views/export.blade.php @@ -35,6 +35,11 @@ @include('export.invoices', ['entityType' => ENTITY_QUOTE]) @endif + @if (isset($recurringInvoices) && $recurringInvoices && count($recurringInvoices)) + {{ strtoupper(trans('texts.recurring_invoices')) }} + @include('export.recurring_invoices', ['entityType' => ENTITY_RECURRING_INVOICE]) + @endif + @if (isset($payments) && $payments && count($payments)) {{ strtoupper(trans('texts.payments')) }} @include('export.payments') diff --git a/resources/views/export/invoices.blade.php b/resources/views/export/invoices.blade.php index fab37fbf8c..6aa9fd6516 100644 --- a/resources/views/export/invoices.blade.php +++ b/resources/views/export/invoices.blade.php @@ -1,5 +1,6 @@ {{ trans('texts.client') }} + {{ trans('texts.email') }} @if ($multiUser) {{ trans('texts.user') }} @endif @@ -28,6 +29,7 @@ @if (!$invoice->client->is_deleted) {{ $invoice->present()->client }} + {{ $invoice->present()->email }} @if ($multiUser) {{ $invoice->present()->user }} @endif From 0e3b78097c4a5f2e317c407033c7491e8ce8fa23 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 25 Feb 2016 11:25:19 +0200 Subject: [PATCH 3/7] Improvements to data export --- .../views/export/recurring_invoices.blade.php | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 resources/views/export/recurring_invoices.blade.php diff --git a/resources/views/export/recurring_invoices.blade.php b/resources/views/export/recurring_invoices.blade.php new file mode 100644 index 0000000000..0548c14b9b --- /dev/null +++ b/resources/views/export/recurring_invoices.blade.php @@ -0,0 +1,55 @@ + + {{ trans('texts.client') }} + {{ trans('texts.email') }} + @if ($multiUser) + {{ trans('texts.user') }} + @endif + {{ trans('texts.frequency') }} + {{ trans('texts.balance') }} + {{ trans('texts.amount') }} + {{ trans('texts.po_number') }} + {{ trans('texts.status') }} + @if ($account->custom_invoice_label1) + {{ $account->custom_invoice_label1 }} + @endif + @if ($account->custom_invoice_label2) + {{ $account->custom_invoice_label2 }} + @endif + @if ($account->custom_invoice_text_label1) + {{ $account->custom_invoice_text_label1 }} + @endif + @if ($account->custom_invoice_text_label2) + {{ $account->custom_invoice_text_label2 }} + @endif + + +@foreach ($recurringInvoices as $invoice) + @if (!$invoice->client->is_deleted) + + {{ $invoice->present()->client }} + {{ $invoice->present()->email }} + @if ($multiUser) + {{ $invoice->present()->user }} + @endif + {{ $invoice->present()->frequency }} + {{ $account->formatMoney($invoice->balance, $invoice->client) }} + {{ $account->formatMoney($invoice->amount, $invoice->client) }} + {{ $invoice->po_number }} + {{ $invoice->present()->status }} + @if ($account->custom_invoice_label1) + {{ $invoice->custom_value1 }} + @endif + @if ($account->custom_invoice_label2) + {{ $invoice->custom_value2 }} + @endif + @if ($account->custom_invoice_label1) + {{ $invoice->custom_text_value1 }} + @endif + @if ($account->custom_invoice_label2) + {{ $invoice->custom_text_value2 }} + @endif + + @endif +@endforeach + + \ No newline at end of file From 689efc3e3e900c35b3bafbbd5065e465e2012ee4 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 25 Feb 2016 12:16:27 +0200 Subject: [PATCH 4/7] Lazy load images --- Gruntfile.js | 2 - app/Http/routes.php | 2 + public/built.js | 17 +- public/css/built.css | 211 ------------------ public/js/script.js | 8 + .../views/accounts/invoice_design.blade.php | 4 +- resources/views/header.blade.php | 6 +- resources/views/invoices/edit.blade.php | 14 +- resources/views/invoices/pdf.blade.php | 25 ++- 9 files changed, 51 insertions(+), 238 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 05dab35047..8b50d2d5b2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -107,7 +107,6 @@ module.exports = function(grunt) { //'public/vendor/pdfmake/build/pdfmake.min.js', //'public/vendor/pdfmake/build/vfs_fonts.js', //'public/js/vfs_fonts.js', - 'public/js/lightbox.min.js', 'public/js/bootstrap-combobox.js', 'public/js/script.js', 'public/js/pdf.pdfmake.js', @@ -140,7 +139,6 @@ module.exports = function(grunt) { 'public/vendor/spectrum/spectrum.css', 'public/css/bootstrap-combobox.css', 'public/css/typeahead.js-bootstrap.css', - 'public/css/lightbox.css', //'public/vendor/handsontable/dist/jquery.handsontable.full.css', 'public/css/style.css', ], diff --git a/app/Http/routes.php b/app/Http/routes.php index 7789d48253..1a92403770 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -528,6 +528,8 @@ if (!defined('CONTACT_EMAIL')) { define('EMAIL_MARKUP_URL', 'https://developers.google.com/gmail/markup'); define('OFX_HOME_URL', 'http://www.ofxhome.com/index.php/home/directory/all'); + define('BLANK_IMAGE', 'data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='); + define('COUNT_FREE_DESIGNS', 4); define('COUNT_FREE_DESIGNS_SELF_HOST', 5); // include the custom design define('PRODUCT_ONE_CLICK_INSTALL', 1); diff --git a/public/built.js b/public/built.js index ec11a94ceb..81952805cb 100644 --- a/public/built.js +++ b/public/built.js @@ -29450,15 +29450,6 @@ links:["Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abi (function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function t(e){return"function"==typeof e}function r(e){return"object"==typeof e&&null!==e}function n(e){q=e}function o(e){Z=e}function i(){return function(){process.nextTick(l)}}function a(){return function(){I(l)}}function s(){var e=0,t=new Y(l),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function u(){var e=new MessageChannel;return e.port1.onmessage=l,function(){e.port2.postMessage(0)}}function c(){return function(){setTimeout(l,1)}}function l(){for(var e=0;B>e;e+=2){var t=K[e],r=K[e+1];t(r),K[e]=void 0,K[e+1]=void 0}B=0}function f(){try{var e=require,t=e("vertx");return I=t.runOnLoop||t.runOnContext,a()}catch(r){return c()}}function p(){}function h(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function d(e){try{return e.then}catch(t){return te.error=t,te}}function m(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function y(e,t,r){Z(function(e){var n=!1,o=m(r,t,function(r){n||(n=!0,t!==r?b(e,r):A(e,r))},function(t){n||(n=!0,C(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,C(e,o))},e)}function v(e,t){t._state===W?A(e,t._result):t._state===ee?C(e,t._result):S(t,void 0,function(t){b(e,t)},function(t){C(e,t)})}function _(e,r){if(r.constructor===e.constructor)v(e,r);else{var n=d(r);n===te?C(e,te.error):void 0===n?A(e,r):t(n)?y(e,r,n):A(e,r)}}function b(t,r){t===r?C(t,h()):e(r)?_(t,r):A(t,r)}function w(e){e._onerror&&e._onerror(e._result),O(e)}function A(e,t){e._state===Q&&(e._result=t,e._state=W,0!==e._subscribers.length&&Z(O,e))}function C(e,t){e._state===Q&&(e._state=ee,e._result=t,Z(w,e))}function S(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+W]=r,o[i+ee]=n,0===i&&e._state&&Z(O,e)}function O(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n,o,i=e._result,a=0;aa;a++)S(n.resolve(e[a]),void 0,t,r);return o}function L(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(p);return b(r,e),r}function P(e){var t=this,r=new t(p);return C(r,e),r}function F(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function R(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function $(e){this._id=ue++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==e&&(t(e)||F(),this instanceof $||R(),j(this,e))}function G(){var e;if("undefined"!=typeof global)e=global;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;(!r||"[object Promise]"!==Object.prototype.toString.call(r.resolve())||r.cast)&&(e.Promise=ce)}var U;U=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var I,q,J,D=U,B=0,Z=({}.toString,function(e,t){K[B]=e,K[B+1]=t,B+=2,2===B&&(q?q(l):J())}),z="undefined"!=typeof window?window:void 0,H=z||{},Y=H.MutationObserver||H.WebKitMutationObserver,X="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),V="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,K=new Array(1e3);J=X?i():Y?s():V?u():void 0===z&&"function"==typeof require?f():c();var Q=void 0,W=1,ee=2,te=new E,re=new E;M.prototype._validateInput=function(e){return D(e)},M.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},M.prototype._init=function(){this._result=new Array(this.length)};var ne=M;M.prototype._enumerate=function(){for(var e=this,t=e.length,r=e.promise,n=e._input,o=0;r._state===Q&&t>o;o++)e._eachEntry(n[o],o)},M.prototype._eachEntry=function(e,t){var n=this,o=n._instanceConstructor;r(e)?e.constructor===o&&e._state!==Q?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(o.resolve(e),t):(n._remaining--,n._result[t]=e)},M.prototype._settledAt=function(e,t,r){var n=this,o=n.promise;o._state===Q&&(n._remaining--,e===ee?C(o,r):n._result[t]=r),0===n._remaining&&A(o,n._result)},M.prototype._willSettleAt=function(e,t){var r=this;S(e,void 0,function(e){r._settledAt(W,t,e)},function(e){r._settledAt(ee,t,e)})};var oe=k,ie=T,ae=L,se=P,ue=0,ce=$;$.all=oe,$.race=ie,$.resolve=ae,$.reject=se,$._setScheduler=n,$._setAsap=o,$._asap=Z,$.prototype={constructor:$,then:function(e,t){var r=this,n=r._state;if(n===W&&!e||n===ee&&!t)return this;var o=new this.constructor(p),i=r._result;if(n){var a=arguments[n-1];Z(function(){x(n,o,a,i)})}else S(r,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var le=G,fe={Promise:ce,polyfill:le};"function"==typeof define&&define.amd?define(function(){return fe}):"undefined"!=typeof module&&module.exports?module.exports=fe:"undefined"!=typeof this&&(this.ES6Promise=fe),le()}).call(this),function(){function e(t,n){function i(e){if(i[e]!==m)return i[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=i("json-stringify")&&i("json-parse");else{var r,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var u=n.stringify,l="function"==typeof u&&_;if(l){(r=function(){return 1}).toJSON=r;try{l="0"===u(0)&&"0"===u(new a)&&'""'==u(new s)&&u(v)===m&&u(m)===m&&u()===m&&"1"===u(r)&&"[1]"==u([r])&&"[null]"==u([m])&&"null"==u(null)&&"[null,null,null]"==u([m,v,null])&&u({a:[r,!0,!1,null,"\x00\b\n\f\r "]})==o&&"1"===u(null,r)&&"[\n 1,\n 2\n]"==u([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==u(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==u(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==u(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==u(new c(-1))}catch(f){l=!1}}t=l}if("json-parse"==e){var p=n.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){r=p(o);var h=5==r.a.length&&1===r.a[0];if(h){try{h=!p('" "')}catch(f){}if(h)try{h=1!==p("01")}catch(f){}if(h)try{h=1!==p("1.")}catch(f){}}}}catch(f){h=!1}t=h}}return i[e]=!!t}t||(t=o.Object()),n||(n=o.Object());var a=t.Number||o.Number,s=t.String||o.String,u=t.Object||o.Object,c=t.Date||o.Date,l=t.SyntaxError||o.SyntaxError,f=t.TypeError||o.TypeError,p=t.Math||o.Math,h=t.JSON||o.JSON;"object"==typeof h&&h&&(n.stringify=h.stringify,n.parse=h.parse);var g,d,m,y=u.prototype,v=y.toString,_=new c(-0xc782b5b800cec);try{_=-109252==_.getUTCFullYear()&&0===_.getUTCMonth()&&1===_.getUTCDate()&&10==_.getUTCHours()&&37==_.getUTCMinutes()&&6==_.getUTCSeconds()&&708==_.getUTCMilliseconds()}catch(b){}if(!i("json")){var w="[object Function]",A="[object Date]",C="[object Number]",S="[object String]",O="[object Array]",E="[object Boolean]",N=i("bug-string-char-index");if(!_)var x=p.floor,j=[0,31,59,90,120,151,181,212,243,273,304,334],M=function(e,t){return j[t]+365*(e-1970)+x((e-1969+(t=+(t>1)))/4)-x((e-1901+t)/100)+x((e-1601+t)/400)};if((g=y.hasOwnProperty)||(g=function(e){var t,r={};return(r.__proto__=null,r.__proto__={toString:1},r).toString!=v?g=function(e){var t=this.__proto__,r=e in(this.__proto__=null,this);return this.__proto__=t,r}:(t=r.constructor,g=function(e){var r=(this.constructor||t).prototype;return e in this&&!(e in r&&this[e]===r[e])}),r=null,g.call(this,e)}),d=function(e,t){var n,o,i,a=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,o=new n;for(i in o)g.call(o,i)&&a++;return n=o=null,a?d=2==a?function(e,t){var r,n={},o=v.call(e)==w;for(r in e)o&&"prototype"==r||g.call(n,r)||!(n[r]=1)||!g.call(e,r)||t(r)}:function(e,t){var r,n,o=v.call(e)==w;for(r in e)o&&"prototype"==r||!g.call(e,r)||(n="constructor"===r)||t(r);(n||g.call(e,r="constructor"))&&t(r)}:(o=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],d=function(e,t){var n,i,a=v.call(e)==w,s=!a&&"function"!=typeof e.constructor&&r[typeof e.hasOwnProperty]&&e.hasOwnProperty||g;for(n in e)a&&"prototype"==n||!s.call(e,n)||t(n);for(i=o.length;n=o[--i];s.call(e,n)&&t(n));}),d(e,t)},!i("json-stringify")){var k={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},T="000000",L=function(e,t){return(T+(t||0)).slice(-e)},P="\\u00",F=function(e){for(var t='"',r=0,n=e.length,o=!N||n>10,i=o&&(N?e.split(""):e);n>r;r++){var a=e.charCodeAt(r);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=k[a];break;default:if(32>a){t+=P+L(2,a.toString(16));break}t+=o?i[r]:e.charAt(r)}}return t+'"'},R=function(e,t,r,n,o,i,a){var s,u,c,l,p,h,y,_,b,w,N,j,k,T,P,$;try{s=t[e]}catch(G){}if("object"==typeof s&&s)if(u=v.call(s),u!=A||g.call(s,"toJSON"))"function"==typeof s.toJSON&&(u!=C&&u!=S&&u!=O||g.call(s,"toJSON"))&&(s=s.toJSON(e));else if(s>-1/0&&1/0>s){if(M){for(p=x(s/864e5),c=x(p/365.2425)+1970-1;M(c+1,0)<=p;c++);for(l=x((p-M(c,0))/30.42);M(c,l+1)<=p;l++);p=1+p-M(c,l),h=(s%864e5+864e5)%864e5,y=x(h/36e5)%24,_=x(h/6e4)%60,b=x(h/1e3)%60,w=h%1e3}else c=s.getUTCFullYear(),l=s.getUTCMonth(),p=s.getUTCDate(),y=s.getUTCHours(),_=s.getUTCMinutes(),b=s.getUTCSeconds(),w=s.getUTCMilliseconds();s=(0>=c||c>=1e4?(0>c?"-":"+")+L(6,0>c?-c:c):L(4,c))+"-"+L(2,l+1)+"-"+L(2,p)+"T"+L(2,y)+":"+L(2,_)+":"+L(2,b)+"."+L(3,w)+"Z"}else s=null;if(r&&(s=r.call(t,e,s)),null===s)return"null";if(u=v.call(s),u==E)return""+s;if(u==C)return s>-1/0&&1/0>s?""+s:"null";if(u==S)return F(""+s);if("object"==typeof s){for(T=a.length;T--;)if(a[T]===s)throw f();if(a.push(s),N=[],P=i,i+=o,u==O){for(k=0,T=s.length;T>k;k++)j=R(k,s,r,n,o,i,a),N.push(j===m?"null":j);$=N.length?o?"[\n"+i+N.join(",\n"+i)+"\n"+P+"]":"["+N.join(",")+"]":"[]"}else d(n||s,function(e){var t=R(e,s,r,n,o,i,a);t!==m&&N.push(F(e)+":"+(o?" ":"")+t)}),$=N.length?o?"{\n"+i+N.join(",\n"+i)+"\n"+P+"}":"{"+N.join(",")+"}":"{}";return a.pop(),$}};n.stringify=function(e,t,n){var o,i,a,s;if(r[typeof t]&&t)if((s=v.call(t))==w)i=t;else if(s==O){a={};for(var u,c=0,l=t.length;l>c;u=t[c++],s=v.call(u),(s==S||s==C)&&(a[u]=1));}if(n)if((s=v.call(n))==C){if((n-=n%1)>0)for(o="",n>10&&(n=10);o.length$;)switch(o=i.charCodeAt($)){case 9:case 10:case 13:case 32:$++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=N?i.charAt($):i[$],$++,e;case 34:for(e="@",$++;a>$;)if(o=i.charCodeAt($),32>o)q();else if(92==o)switch(o=i.charCodeAt(++$)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=I[o],$++;break;case 117:for(t=++$,r=$+4;r>$;$++)o=i.charCodeAt($),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||q();e+=U("0x"+i.slice(t,$));break;default:q()}else{if(34==o)break;for(o=i.charCodeAt($),t=$;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++$);e+=i.slice(t,$)}if(34==i.charCodeAt($))return $++,e;q();default:if(t=$,45==o&&(n=!0,o=i.charCodeAt(++$)),o>=48&&57>=o){for(48==o&&(o=i.charCodeAt($+1),o>=48&&57>=o)&&q(),n=!1;a>$&&(o=i.charCodeAt($),o>=48&&57>=o);$++);if(46==i.charCodeAt($)){for(r=++$;a>r&&(o=i.charCodeAt(r),o>=48&&57>=o);r++);r==$&&q(),$=r}if(o=i.charCodeAt($),101==o||69==o){for(o=i.charCodeAt(++$),(43==o||45==o)&&$++,r=$;a>r&&(o=i.charCodeAt(r),o>=48&&57>=o);r++);r==$&&q(),$=r}return+i.slice(t,$)}if(n&&q(),"true"==i.slice($,$+4))return $+=4,!0;if("false"==i.slice($,$+5))return $+=5,!1;if("null"==i.slice($,$+4))return $+=4,null;q()}return"$"},D=function(e){var t,r;if("$"==e&&q(),"string"==typeof e){if("@"==(N?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=J(),"]"!=e;r||(r=!0))r&&(","==e?(e=J(),"]"==e&&q()):q()),","==e&&q(),t.push(D(e));return t}if("{"==e){for(t={};e=J(),"}"!=e;r||(r=!0))r&&(","==e?(e=J(),"}"==e&&q()):q()),(","==e||"string"!=typeof e||"@"!=(N?e.charAt(0):e[0])||":"!=J())&&q(),t[e.slice(1)]=D(J());return t}q()}return e},B=function(e,t,r){var n=Z(e,t,r);n===m?delete e[t]:e[t]=n},Z=function(e,t,r){var n,o=e[t];if("object"==typeof o&&o)if(v.call(o)==O)for(n=o.length;n--;)B(o,n,r);else d(o,function(e){B(o,e,r)});return r.call(e,t,o)};n.parse=function(e,t){var r,n;return $=0,G=""+e,r=D(J()),"$"!=J()&&q(),$=G=null,t&&v.call(t)==w?Z((n={},n[""]=r,n),"",t):r}}}return n.runInContext=e,n}var t="function"==typeof define&&define.amd,r={"function":!0,object:!0},n=r[typeof exports]&&exports&&!exports.nodeType&&exports,o=r[typeof window]&&window||this,i=n&&r[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!i||i.global!==i&&i.window!==i&&i.self!==i||(o=i),n&&!t)e(o,n);else{var a=o.JSON,s=o.JSON3,u=!1,c=e(o,o.JSON3={noConflict:function(){return u||(u=!0,o.JSON=a,o.JSON3=s,a=s=null),c}});o.JSON={parse:c.parse,stringify:c.stringify}}t&&define(function(){return c})}.call(this),"undefined"==typeof Promise&&ES6Promise.polyfill(),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),r=this,n=function(){},o=function(){return r.apply(this instanceof n&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return n.prototype=this.prototype,o.prototype=new n,o}),Array.prototype.map||(Array.prototype.map=function(e,t){if(void 0===this||null===this)throw new TypeError("this is null or not defined");var r,n=Object(this),o=n.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");arguments.length>1&&(r=t);for(var i=new Array(o),a=0;o>a;){var s,u;a in n&&(s=n[a],u=e.call(r,s,a,n),i[a]=u),a++}return i}),Array.prototype.filter||(Array.prototype.filter=function(e){if(void 0===this||null===this)throw new TypeError("this is null or not defined");var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(var n=[],o=arguments.length>=2?arguments[1]:void 0,i=0;r>i;i++)if(i in t){var a=t[i];e.call(o,a,i,t)&&n.push(a)}return n}),Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var r,n;if(null===this||void 0===this)throw new TypeError(" this is null or not defined");var o=Object(this),i=o.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(r=t),n=0;i>n;){var a;n in o&&(a=o[n],e.call(r,a,n,o)),n++}}),!function(e,t){"use strict";"function"==typeof define&&define.amd?define("stackframe",[],t):"object"==typeof exports?module.exports=t():e.StackFrame=t()}(this,function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e,t,r,n,o){void 0!==e&&this.setFunctionName(e),void 0!==t&&this.setArgs(t),void 0!==r&&this.setFileName(r),void 0!==n&&this.setLineNumber(n),void 0!==o&&this.setColumnNumber(o)}return t.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(e){this.functionName=String(e)},getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getFileName:function(){return this.fileName},setFileName:function(e){this.fileName=String(e)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(t){if(!e(t))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(t)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(t){if(!e(t))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(t)},toString:function(){var t=this.getFunctionName()||"{anonymous}",r="("+(this.getArgs()||[]).join(",")+")",n=this.getFileName()?"@"+this.getFileName():"",o=e(this.getLineNumber())?":"+this.getLineNumber():"",i=e(this.getColumnNumber())?":"+this.getColumnNumber():"";return t+r+n+o+i}},t});var SourceMap=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n;n=function(e,t,n){function o(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=i.getArg(t,"version"),n=i.getArg(t,"sources"),o=i.getArg(t,"names",[]),a=i.getArg(t,"sourceRoot",null),u=i.getArg(t,"sourcesContent",null),c=i.getArg(t,"mappings"),l=i.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);n=n.map(i.normalize),this._names=s.fromArray(o,!0),this._sources=s.fromArray(n,!0),this.sourceRoot=a,this.sourcesContent=u,this._mappings=c,this.file=l}var i=r(1),a=r(2),s=r(3).ArraySet,u=r(4);o.fromSourceMap=function(e){var t=Object.create(o.prototype);return t._names=s.fromArray(e._names.toArray(),!0),t._sources=s.fromArray(e._sources.toArray(),!0),t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file,t.__generatedMappings=e._mappings.toArray().slice(),t.__originalMappings=e._mappings.toArray().slice().sort(i.compareByOriginalPositions),t},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?i.join(this.sourceRoot,e):e},this)}}),o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),o.prototype._nextCharIsMappingSeparator=function(e){var t=e.charAt(0);return";"===t||","===t},o.prototype._parseMappings=function(e,t){for(var r,n=1,o=0,a=0,s=0,c=0,l=0,f=e,p={};f.length>0;)if(";"===f.charAt(0))n++,f=f.slice(1),o=0;else if(","===f.charAt(0))f=f.slice(1);else{if(r={},r.generatedLine=n,u.decode(f,p),r.generatedColumn=o+p.value,o=r.generatedColumn,f=p.rest,f.length>0&&!this._nextCharIsMappingSeparator(f)){if(u.decode(f,p),r.source=this._sources.at(c+p.value),c+=p.value,f=p.rest,0===f.length||this._nextCharIsMappingSeparator(f))throw new Error("Found a source, but no line and column");if(u.decode(f,p),r.originalLine=a+p.value,a=r.originalLine,r.originalLine+=1,f=p.rest,0===f.length||this._nextCharIsMappingSeparator(f))throw new Error("Found a source and line, but no column");u.decode(f,p),r.originalColumn=s+p.value,s=r.originalColumn,f=p.rest,f.length>0&&!this._nextCharIsMappingSeparator(f)&&(u.decode(f,p),r.name=this._names.at(l+p.value),l+=p.value,f=p.rest)}this.__generatedMappings.push(r),"number"==typeof r.originalLine&&this.__originalMappings.push(r)}this.__generatedMappings.sort(i.compareByGeneratedPositions),this.__originalMappings.sort(i.compareByOriginalPositions)},o.prototype._findMapping=function(e,t,r,n,o){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return a.search(e,t,o)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var o=i.getArg(n,"source",null);return null!=o&&null!=this.sourceRoot&&(o=i.join(this.sourceRoot,o)),{source:o,line:i.getArg(n,"originalLine",null),column:i.getArg(n,"originalColumn",null),name:i.getArg(n,"name",null)}}}return{source:null,line:null,column:null,name:null}},o.prototype.sourceContentFor=function(e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=i.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var t;if(null!=this.sourceRoot&&(t=i.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==t.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!t.path||"/"==t.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var t={source:i.getArg(e,"source"),originalLine:i.getArg(e,"line"),originalColumn:i.getArg(e,"column")};null!=this.sourceRoot&&(t.source=i.relative(this.sourceRoot,t.source));var r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions);if(r>=0){var n=this._originalMappings[r];return{line:i.getArg(n,"generatedLine",null),column:i.getArg(n,"generatedColumn",null),lastColumn:i.getArg(n,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},o.prototype.allGeneratedPositionsFor=function(e){var t={source:i.getArg(e,"source"),originalLine:i.getArg(e,"line"),originalColumn:1/0};null!=this.sourceRoot&&(t.source=i.relative(this.sourceRoot,t.source));var r=[],n=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions);if(n>=0)for(var o=this._originalMappings[n];o&&o.originalLine===t.originalLine;)r.push({line:i.getArg(o,"generatedLine",null),column:i.getArg(o,"generatedColumn",null),lastColumn:i.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[--n];return r.reverse()},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.prototype.eachMapping=function(e,t,r){var n,a=t||null,s=r||o.GENERATED_ORDER;switch(s){case o.GENERATED_ORDER:n=this._generatedMappings;break;case o.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;n.map(function(e){var t=e.source;return null!=t&&null!=u&&(t=i.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,a)},t.SourceMapConsumer=o}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,r){var n;n=function(e,t,r){function n(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')}function o(e){var t=e.match(g);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(e){var t=e,r=o(e);if(r){if(!r.path)return e;t=r.path}for(var n,a="/"===t.charAt(0),s=t.split(/\/+/),u=0,c=s.length-1;c>=0;c--)n=s[c],"."===n?s.splice(c,1):".."===n?u++:u>0&&(""===n?(s.splice(c+1,u),u=0):(s.splice(c,2),u--));return t=s.join("/"),""===t&&(t=a?"/":"."),r?(r.path=t,i(r)):t}function s(e,t){""===e&&(e="."),""===t&&(t=".");var r=o(t),n=o(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),i(r);if(r||t.match(d))return t;if(n&&!n.host&&!n.path)return n.host=t,i(n);var s="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=s,i(n)):s}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");var r=o(e);return"/"==t.charAt(0)&&r&&"/"==r.path?t.slice(1):0===t.indexOf(e+"/")?t.substr(e.length+1):t}function c(e){return"$"+e}function l(e){return e.substr(1)}function f(e,t){var r=e||"",n=t||"";return(r>n)-(n>r)}function p(e,t,r){var n;return(n=f(e.source,t.source))?n:(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,n||r?n:(n=f(e.name,t.name))?n:(n=e.generatedLine-t.generatedLine,n?n:e.generatedColumn-t.generatedColumn))}function h(e,t,r){var n;return(n=e.generatedLine-t.generatedLine)?n:(n=e.generatedColumn-t.generatedColumn,n||r?n:(n=f(e.source,t.source))?n:(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,n?n:f(e.name,t.name)))}t.getArg=n;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,d=/^data:.+\,.+$/;t.urlParse=o,t.urlGenerate=i,t.normalize=a,t.join=s,t.relative=u,t.toSetString=c,t.fromSetString=l,t.compareByOriginalPositions=p,t.compareByGeneratedPositions=h}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,r){var n;n=function(e,t,r){function n(e,t,r,o,i){var a=Math.floor((t-e)/2)+e,s=i(r,o[a],!0);return 0===s?a:s>0?t-a>1?n(a,t,r,o,i):a:a-e>1?n(e,a,r,o,i):0>e?-1:e}t.search=function(e,t,r){return 0===t.length?-1:n(-1,t.length,e,t,r)}}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,r){var n;n=function(e,t,n){function o(){this._array=[],this._set={}}var i=r(1);o.fromArray=function(e,t){for(var r=new o,n=0,i=e.length;i>n;n++)r.add(e[n],t);return r},o.prototype.add=function(e,t){var r=this.has(e),n=this._array.length;(!r||t)&&this._array.push(e),r||(this._set[i.toSetString(e)]=n)},o.prototype.has=function(e){return Object.prototype.hasOwnProperty.call(this._set,i.toSetString(e))},o.prototype.indexOf=function(e){if(this.has(e))return this._set[i.toSetString(e)];throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&ee?(-e<<1)+1:(e<<1)+0}function i(e){var t=1===(1&e),r=e>>1;return t?-r:r}var a=r(5),s=5,u=1<>>=s,n>0&&(t|=l),r+=a.encode(t);while(n>0);return r},t.decode=function(e,t){var r,n,o=0,u=e.length,f=0,p=0;do{if(o>=u)throw new Error("Expected more digits in base 64 VLQ value.");n=a.decode(e.charAt(o++)),r=!!(n&l),n&=c,f+=n<=200&&o.status<400)return t(o.responseText);n(new Error("Unable to retrieve "+e))}},o.send()}function o(e,t,r){for(var n,o,i,a=/function\s+([^(]*?)\s*\(([^)]*)\)/,s=/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,u=/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,c=e.split("\n"),l="",f=Math.min(t,20),p=0;f>p;++p)if(n=c[t-p-1],i=n.indexOf("//"),i>=0&&(n=n.substr(0,i)),n){if(l=n+l,o=s.exec(l),o&&o[1])return o[1];if(o=a.exec(l),o&&o[1])return o[1];if(o=u.exec(l),o&&o[1])return o[1]}return void 0}function i(){if("function"!=typeof Object.defineProperty||"function"!=typeof Object.create)throw new Error("Unable to consume source maps in older browsers")}function a(e){if("object"!=typeof e)throw new TypeError("Given StackFrame is not an object");if("string"!=typeof e.fileName)throw new TypeError("Given file name is not a String");if("number"!=typeof e.lineNumber||e.lineNumber%1!==0||e.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if("number"!=typeof e.columnNumber||e.columnNumber%1!==0||e.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function s(e){var t=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)$/.exec(e);if(t&&t[1])return t[1];throw new Error("sourceMappingURL not found")}function u(r,n,o,i){var a=new e.SourceMapConsumer(r).originalPositionFor({line:o,column:i});return new t(a.name,n,a.source,a.line,a.column)}return function c(e){return this instanceof c?(e=e||{},this.sourceCache=e.sourceCache||{},this.ajax=n,this._atob=function(e){if(window&&window.atob)return window.atob(e);if("undefined"!=typeof Buffer)return new Buffer(e,"base64").toString("utf-8");throw new Error("No base64 decoder available")},this._get=function(t){return new Promise(function(r,n){var o="data:"===t.substr(0,5);if(this.sourceCache[t])r(this.sourceCache[t]);else if(e.offline&&!o)n(new Error("Cannot make network requests in offline mode"));else if(o){var i="application/json;base64";if(t.substr(5,i.length)!==i)n(new Error("The encoding of the inline sourcemap is not supported"));else{var a="data:".length+i.length+",".length,s=t.substr(a),u=this._atob(s);this.sourceCache[t]=u,r(u)}}else this.ajax(t,function(e){this.sourceCache[t]=e,r(e)}.bind(this),n)}.bind(this))},this.pinpoint=function(e){return new Promise(function(t,r){this.getMappedLocation(e).then(function(e){function r(){t(e)}this.findFunctionName(e).then(t,r)["catch"](r)}.bind(this),r)}.bind(this))},this.findFunctionName=function(e){return new Promise(function(r,n){a(e),this._get(e.fileName).then(function(n){var i=o(n,e.lineNumber,e.columnNumber);r(new t(i,e.args,e.fileName,e.lineNumber,e.columnNumber))},n)}.bind(this))},void(this.getMappedLocation=function(e){return new Promise(function(t,r){i(),a(e);var n=e.fileName;this._get(n).then(function(o){var i=s(o);"/"!==i[0]&&(i=n.substring(0,n.lastIndexOf("/")+1)+i),this._get(i).then(function(r){var n=e.lineNumber,o=e.columnNumber;t(u(r,e.args,n,o))},r)["catch"](r)}.bind(this),r)["catch"](r)}.bind(this))})):new c(e)}}),function(e,t){"use strict";"function"==typeof define&&define.amd?define("stack-generator",["stackframe"],t):"object"==typeof exports?module.exports=t(require("stackframe")):e.StackGenerator=t(e.StackFrame)}(this,function(e){return{backtrace:function(t){var r=[],n=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(n=t.maxStackSize);for(var o=arguments.callee;o&&r.length-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),o=[],i=2,a=n.length;a>i;i+=2){var s=r.exec(n[i]);s&&o.push(new e(void 0,void 0,s[2],s[1],void 0,n[i]))}return o},parseOpera10:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split("\n"),o=[],i=0,a=n.length;a>i;i+=2){var s=r.exec(n[i]);s&&o.push(new e(s[3]||void 0,void 0,s[2],s[1],void 0,n[i]))}return o},parseOpera11:function(r){return r.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(t){var r,n=t.split("@"),o=this.extractLocation(n.pop()),i=n.shift()||"",a=i.replace(//,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(r=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new e(a,s,o[0],o[1],o[2],t)},this)}}}),function(e,t){"use strict";"function"==typeof define&&define.amd?define("stacktrace",["error-stack-parser","stack-generator","stacktrace-gps"],t):"object"==typeof exports?module.exports=t(require("error-stack-parser"),require("stack-generator"),require("stacktrace-gps")):e.StackTrace=t(e.ErrorStackParser,e.StackGenerator,e.StackTraceGPS)}(this,function(e,t,r){function n(e,t){var r={};return[e,t].forEach(function(e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}),r}function o(e){return e.stack||e["opera#sourceloc"]}var i={filter:function(e){return-1===(e.functionName||"").indexOf("StackTrace$$")&&-1===(e.functionName||"").indexOf("ErrorStackParser$$")&&-1===(e.functionName||"").indexOf("StackTraceGPS$$")&&-1===(e.functionName||"").indexOf("StackGenerator$$")}};return{get:function(e){try{throw new Error}catch(t){return o(t)?this.fromError(t,e):this.generateArtificially(e)}},fromError:function(t,o){return o=n(i,o),new Promise(function(n){var i=e.parse(t);"function"==typeof o.filter&&(i=i.filter(o.filter)),n(Promise.all(i.map(function(e){return new Promise(function(t){function n(r){t(e)}new r(o).pinpoint(e).then(t,n)["catch"](n)})})))}.bind(this))},generateArtificially:function(e){e=n(i,e);var r=t.backtrace(e);return"function"==typeof e.filter&&(r=r.filter(e.filter)),Promise.resolve(r)},instrument:function(e,t,r,n){if("function"!=typeof e)throw new Error("Cannot instrument non-function object");if("function"==typeof e.__stacktraceOriginalFn)return e;var i=function(){try{this.get().then(t,r)["catch"](r),e.apply(n||this,arguments)}catch(i){throw o(i)&&this.fromError(i).then(t,r)["catch"](r),i}}.bind(this);return i.__stacktraceOriginalFn=e,i},deinstrument:function(e){if("function"!=typeof e)throw new Error("Cannot de-instrument non-function object");return"function"==typeof e.__stacktraceOriginalFn?e.__stacktraceOriginalFn:e},report:function(e,t){return new Promise(function(r,n){var o=new XMLHttpRequest;o.onerror=n,o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<400?r(o.responseText):n(new Error("POST to "+t+" failed with status: "+o.status)))},o.open("post",t),o.setRequestHeader("Content-Type","application/json"),o.send(JSON.stringify({stack:e}))})}}}); //# sourceMappingURL=vendor/stacktrace-js/dist/stacktrace-with-polyfills.min.js.map -/** - * Lightbox v2.7.1 - * by Lokesh Dhakar - http://lokeshdhakar.com/projects/lightbox2/ - * - * @license http://creativecommons.org/licenses/by/2.5/ - * - Free for use in both personal and commercial projects - * - Attribution requires leaving author name, author link, and the license info intact - */ -(function(){var a=jQuery,b=function(){function a(){this.fadeDuration=500,this.fitImagesInViewport=!0,this.resizeDuration=700,this.positionFromTop=50,this.showImageNumberLabel=!0,this.alwaysShowNavOnTouchDevices=!1,this.wrapAround=!1}return a.prototype.albumLabel=function(a,b){return"Image "+a+" of "+b},a}(),c=function(){function b(a){this.options=a,this.album=[],this.currentImageIndex=void 0,this.init()}return b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a("
").appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return b.changeImage(0===b.currentImageIndex?b.album.length-1:b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.changeImage(b.currentImageIndex===b.album.length-1?0:b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;ij||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(window).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex1&&this.options.showImageNumberLabel?this.$lightbox.find(".lb-number").text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn("fast"):this.$lightbox.find(".lb-number").hide(),this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"})},b}();a(function(){{var a=new b;new c(a)}})}).call(this); /* ============================================================= * bootstrap-combobox.js v1.1.5 * ============================================================= @@ -30907,6 +30898,14 @@ function actionListHandler() { }); } +function loadImages(selector) { + $(selector + ' img').each(function(index, item) { + var src = $(item).attr('data-src'); + $(item).attr('src', src); + $(item).attr('data-src', src); + }); +} + var NINJA = NINJA || {}; NINJA.TEMPLATES = { diff --git a/public/css/built.css b/public/css/built.css index 5a511b0f1f..763b433e6a 100644 --- a/public/css/built.css +++ b/public/css/built.css @@ -2138,217 +2138,6 @@ See http://bgrins.github.io/spectrum/themes/ for instructions. border-radius: 6px; line-height: 1.33; } -/* Preload images */ -body:after { - content: url(../images/lightbox/close.png) url(../images/lightbox/loading.gif) url(../images/lightbox/prev.png) url(../images/lightbox/next.png); - display: none; -} - -.lightboxOverlay { - position: absolute; - top: 0; - left: 0; - z-index: 9999; - background-color: black; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); - opacity: 0.8; - display: none; -} - -.lightbox { - position: absolute; - left: 0; - width: 100%; - z-index: 10000; - text-align: center; - line-height: 0; - font-weight: normal; -} - -.lightbox .lb-image { - display: block; - height: auto; - max-width: inherit; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - -ms-border-radius: 3px; - -o-border-radius: 3px; - border-radius: 3px; -} - -.lightbox a img { - border: none; -} - -.lb-outerContainer { - position: relative; - background-color: white; - *zoom: 1; - width: 250px; - height: 250px; - margin: 0 auto; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -ms-border-radius: 4px; - -o-border-radius: 4px; - border-radius: 4px; -} - -.lb-outerContainer:after { - content: ""; - display: table; - clear: both; -} - -.lb-container { - padding: 4px; -} - -.lb-loader { - position: absolute; - top: 43%; - left: 0; - height: 25%; - width: 100%; - text-align: center; - line-height: 0; -} - -.lb-cancel { - display: block; - width: 32px; - height: 32px; - margin: 0 auto; - background: url(../images/lightbox/loading.gif) no-repeat; -} - -.lb-nav { - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; - z-index: 10; -} - -.lb-container > .nav { - left: 0; -} - -.lb-nav a { - outline: none; - background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); -} - -.lb-prev, .lb-next { - height: 100%; - cursor: pointer; - display: block; -} - -.lb-nav a.lb-prev { - width: 34%; - left: 0; - float: left; - background: url(../images/lightbox/prev.png) left 48% no-repeat; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); - opacity: 0; - -webkit-transition: opacity 0.6s; - -moz-transition: opacity 0.6s; - -o-transition: opacity 0.6s; - transition: opacity 0.6s; -} - -.lb-nav a.lb-prev:hover { - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - opacity: 1; -} - -.lb-nav a.lb-next { - width: 64%; - right: 0; - float: right; - background: url(../images/lightbox/next.png) right 48% no-repeat; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); - opacity: 0; - -webkit-transition: opacity 0.6s; - -moz-transition: opacity 0.6s; - -o-transition: opacity 0.6s; - transition: opacity 0.6s; -} - -.lb-nav a.lb-next:hover { - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - opacity: 1; -} - -.lb-dataContainer { - margin: 0 auto; - padding-top: 5px; - *zoom: 1; - width: 100%; - -moz-border-radius-bottomleft: 4px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomright: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -.lb-dataContainer:after { - content: ""; - display: table; - clear: both; -} - -.lb-data { - padding: 0 4px; - color: #ccc; -} - -.lb-data .lb-details { - width: 85%; - float: left; - text-align: left; - line-height: 1.1em; -} - -.lb-data .lb-caption { - font-size: 13px; - font-weight: bold; - line-height: 1em; -} - -.lb-data .lb-number { - display: block; - clear: left; - padding-bottom: 1em; - font-size: 12px; - color: #999999; -} - -.lb-data .lb-close { - display: block; - float: right; - width: 30px; - height: 30px; - background: url(../images/lightbox/close.png) top right no-repeat; - text-align: right; - outline: none; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); - opacity: 0.7; - -webkit-transition: opacity 0.2s; - -moz-transition: opacity 0.2s; - -o-transition: opacity 0.2s; - transition: opacity 0.2s; -} - -.lb-data .lb-close:hover { - cursor: pointer; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - opacity: 1; -} - body { background: #f8f8f8 !important; font-family: 'Roboto', sans-serif; font-size: 15px; diff --git a/public/js/script.js b/public/js/script.js index a98db86385..2dc527f6d3 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -1025,3 +1025,11 @@ function actionListHandler() { } }); } + +function loadImages(selector) { + $(selector + ' img').each(function(index, item) { + var src = $(item).attr('data-src'); + $(item).attr('src', src); + $(item).attr('data-src', src); + }); +} diff --git a/resources/views/accounts/invoice_design.blade.php b/resources/views/accounts/invoice_design.blade.php index 2c7468cb16..09bb55bfb1 100644 --- a/resources/views/accounts/invoice_design.blade.php +++ b/resources/views/accounts/invoice_design.blade.php @@ -7,7 +7,9 @@ @foreach ($account->getFontFolders() as $font) @endforeach - + + + @stop diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index e5f52b0a7a..6074859a01 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -736,7 +736,7 @@ @if (Auth::user()->account->isWhiteLabel()) {{ trans('texts.white_labeled') }} @else - {{ trans('texts.white_label_link') }} + {{ trans('texts.white_label_link') }}