forked from paulmillr/mnp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
554 lines (491 loc) · 17.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>MNP - My new passport</title>
<meta name="description" content="MNP (My new passport). Great way to pick new place of living by ratings.">
<link rel="stylesheet" href="app.css">
</head>
<body>
<div id="app">
<div class="loader">Loading...</div>
</div>
<script type="text/x-handlebars" data-template-name="choose-destiny-sketch">
I am looking for countries which:
<ul>
<li>are best suited for business</li>
<li>allow to purchase citizenship quickly</li>
<li>allow me to live nicely on a welfare</li>
<li>do not require degree for work visas</li>
<li>allow to own guns for self-defense</li>
<li></li>
</ul>
Re-order your other priorities:
[drag n drop widget]
Crime
Consumer prices
Freedom of speech
Ease of doing business
Corruption
</script>
<script type="text/x-handlebars" data-template-name="application">
{{render 'navbar'}}
<div class="container">
{{outlet}}
</div>
<footer>
<div class="container">
<p>
Crafted with love by
<a href="http://goshakkk.name/"><img src="https://1.gravatar.com/avatar/477dc65c2083c0aea87485b399372db0?size=64" alt="goshakkk avatar" height="32" /></a>
<a href="http://goshakkk.name/">@goshakkk</a> and
<a href="http://paulmillr.com"><img src="https://1.gravatar.com/avatar/d342e4ef045c54a6a6f41d070d8a0406?size=64" alt="paulmillr avatar" height="32" /></a>
<a href="http://paulmillr.com">@paulmillr</a>.
</p>
<p>Spotted a typo, incorrect or not full data? Open an issue or submit a PR on <a href="https://github.com/paulmillr/itc">GitHub</a>.</p>
</div>
</footer>
</script>
<script type="text/x-handlebars" data-template-name="navbar">
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
{{#link-to 'index' class="navbar-brand"}}MNP — MyNewPassport{{/link-to}}
</div>
<ul class="nav navbar-nav">
{{#link-to 'tax-rating' tagName='li'}}{{#link-to 'tax-rating'}}Tax rating{{/link-to}}{{/link-to}}
{{#link-to 'ratings' tagName='li'}}{{#link-to 'ratings'}}Living ratings{{/link-to}}{{/link-to}}
{{#link-to 'choose-destiny' tagName='li'}}{{#link-to 'choose-destiny'}}Choose destiny{{/link-to}}{{/link-to}}
</ul>
<form class="navbar-form navbar-right">
<div>
{{view Ember.Select
contentBinding="App.CURRENCIES"
valueBinding="currencyCode"
optionLabelPath="content.symbol"
optionValuePath="content.code"
class="form-control"}}
</div>
</form>
</div>
</nav>
</script>
<script type="text/x-handlebars" data-template-name="components/money-input">
<form class="form-inline">
<div class="form-group">
{{input value=fmtValue autocomplete="off" autofocus=autofocus type="text" class="form-control" placeholder=placeholder}}
</div>
<div class="form-group">
{{view Ember.Select
contentBinding="App.CURRENCIES"
valueBinding="currencyCode"
optionLabelPath="content.symbol"
optionValuePath="content.code"
class="form-control"}}
</div>
</form>
</script>
<script type="text/x-handlebars" data-template-name="index">
<div class="alert alert-warning">
We are changing the purpose of this rating.
<strong>Before:</strong> tax calculator.
<strong>Target:</strong> great advisory summary pages / comparison tables on migration.
</div>
<div class="row">
<div class="col-md-4 col-md-offset-2">
<div class="well">
<h3 class="text-center">
{{#link-to 'tax-rating'}}Tax rating{{/link-to}}
</h3>
<p>Compare countries (states) based on the tax burden that it going to be put on <i>your</i> income.</p>
</div>
</div>
<div class="col-md-4">
<div class="well">
<h3 class="text-center">
{{#link-to 'ratings'}}Living ratings{{/link-to}}
</h3>
<p>Compare countries based on their living conditions.</p>
</div>
</div>
<div class="col-md-4">
<div class="well">
<h3 class="text-center">
{{#link-to 'choose-destiny'}}Choose your destiny{{/link-to}}
</h3>
<p>Filter the countries based on various options.</p>
</div>
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="choose-destiny">
<div class="row">
<div class="col-md-4">
<h3>Immigration</h3>
<ul>
<li>
<label>
{{input type="checkbox" checked=filterSet.warmClimate}}
Warm climate
</label>
</li>
<li>
<label>
{{input type="checkbox" checked=filterSet.lowCrime}}
Low crime rate
</label>
</li>
<li>
<label>
{{input type="checkbox" checked=filterSet.ruleOfLaw}}
Rule of law
</label>
</li>
<li>
<label>
{{input type="checkbox" checked=filterSet.lowTaxes}}
Low income tax rate (<20%)
</label>
</li>
<li>
<h5>Work visas</h5>
<ul>
<li>
<label>
{{input type="checkbox" checked=filterSet.noEducationWorkVisa}}
No degree requirement
</label>
</li>
<li>
<label>
{{input type="checkbox" checked=filterSet.noWorkVisaQuotas}}
No quotas
</label>
</li>
</ul>
</li>
<li>
<label>
{{input type="checkbox" checked=filterSet.simpleStartupVisa}}
Business visas
</label>
<ul>
<li>
<label>
Capital requirement
{{input type="range"}}
</label>
</li>
</ul>
</li>
</ul>
</div>
<div class="col-md-8">
<table class="table table-striped">
<thead>
<tr>
<th>Country</th>
</tr>
</thead>
<tbody>
{{#each results}}
<tr>
<td>
{{#link-to 'details' slug}}
<img class="flag" {{bind-attr src=flagURL alt=name}} width="24" height="24" />
<span class="country-name">{{name}}</span>
{{/link-to}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="ratings">
<table class="table table-striped">
<thead>
<tr>
<th>Country</th>
<th><a href="http://www.numbeo.com/crime/rankings_by_country.jsp">Crime index</a></th>
<th><a href="http://www.numbeo.com/cost-of-living/rankings_by_country.jsp">Price index</a></th>
<th><a href="http://www.doingbusiness.org/rankings">Doing business</a></th>
<th><a href="http://cpi.transparency.org/cpi2013/results/">Corruption perception</a></th>
</tr>
</thead>
<tbody>
{{#each}}
<tr>
<td>
{{#link-to 'details' slug}}
<img class="flag" {{bind-attr src=flagURL alt=country.name}} width="24" height="24" />
<span class="country-name">{{name}}</span>
{{/link-to}}
</td>
<td>{{subj-rating name="crime" rating=ratings.crime}}</td>
<td>{{subj-rating name="prices" rating=ratings.prices}}</td>
<td>{{subj-rating name="business" rating=ratings.business}}</td>
<td>{{subj-rating name="corruption" rating=ratings.corruption}}</td>
</tr>
{{/each}}
</tbody>
</table>
</script>
<script type="text/x-handlebars" data-template-name="tax-rating">
{{money-input value=income currencyCode=currencyCode debounce=500 autofocus=true placeholder="Annual pre-tax income"}}
<p class="help-block">
Try the following values:
<a href="#" {{action 'setIncome' '50000'}}>$50,000</a>,
<a href="#" {{action 'setIncome' '100000'}}>$100,000</a>,
<a href="#" {{action 'setIncome' '250000'}}>$250,000</a>,
<a href="#" {{action 'setIncome' '500000'}}>$500,000</a>,
<a href="#" {{action 'setIncome' '1000000'}}>$1,000,000</a>
</p>
<div class="alert alert-warning">
<p>For the purpose of calculation, it is assumed that you are a single individual with no kids, and that all your income comes from wage or contracts.</p>
<p>Calculations do not take into account solidarity and other kinds of taxes, different deductions, contributions like Social Security yet.</p>
<p>Last updated on: <strong>December 25, 2013</strong>.</p>
</div>
{{render 'results' results}}
</script>
<script type="text/x-handlebars" data-template-name="results">
<table class="table table-striped">
<thead>
<tr>
<th>Country</th>
<th>Effective tax rate</th>
<th>{{currency}} in taxes</th>
<th>{{currency}} take home</th>
</tr>
</thead>
<tbody>
{{#each}}
<tr>
<td>
{{#if state}}
{{#link-to 'details_state' country.slug state.slug}}
<img class="flag" {{bind-attr src=country.flagURL alt=country.name}} width="24" height="24" />
<span class="country-name">{{country.name}} — {{state.name}}</span>
{{/link-to}}
{{else}}
{{#link-to 'details' country.slug}}
<img class="flag" {{bind-attr src=country.flagURL alt=country.name}} width="24" height="24" />
<span class="country-name">{{country.name}}</span>
{{/link-to}}
{{/if}}
</td>
<td>{{percent effectiveRate}}</td>
<td>{{money taxAmount}}</td>
<td>{{money takeHome}}</td>
</tr>
{{/each}}
</tbody>
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/tax-bands">
{{#if isFlatTax}}
<p>Flat rate of <b>{{rawPercent flatTaxRate}}</b></p>
{{else}}
<table class="table table-striped">
<thead>
<tr>
<th>Range (in {{currency}})</th>
<th>Rate</th>
</tr>
</thead>
<tbody>
{{#each bands}}
<tr>
<td>Up to {{money max}}</td>
<td>{{rawPercent rate}}</td>
</tr>
{{/each}}
</tbody>
</table>
{{/if}}
</script>
<script type="text/x-handlebars" data-template-name="components/sample-rates">
<table class="table table-striped">
<thead>
<tr>
<th>{{currency}} income</th>
<th>Effective tax rate</th>
<th>{{currency}} in taxes</th>
<th>{{currency}} take home</th>
</tr>
</thead>
<tbody>
{{#each samples}}
<tr>
<td>{{money income}}</td>
<td>{{percent effectiveRate}}</td>
<td>{{money taxAmount}}</td>
<td>{{money takeHome}}</td>
</tr>
{{/each}}
<tr>
<td>
{{money-input value=demoIncome currencyCode=currencyCode placeholder="Annual pre-tax income"}}
</td>
<td>{{percent result.effectiveRate}}</td>
<td>{{money result.taxAmount}}</td>
<td>{{money result.takeHome}}</td>
</tr>
</tbody>
</table>
</script>
<script type="text/x-handlebars" data-template-name="details">
<h2>
<img class="flag" {{bind-attr src=flagURL alt=name}}>
{{name}}
{{#if hasStates}} — {{state.name}}{{/if}}
</h2>
<h3>Taxation</h3>
<div class="row">
<div class="col-sm-4">
{{#if country.hasStates}}
<h4>
Federal income tax bands
{{#if ratesSource}}<small><a {{bind-attr href=ratesSource}} target="_blank">(source)</a></small>{{/if}}
</h4>
{{tax-bands countryOrState=country currencyCode=currencyCode}}
{{#if state}}
<h4>
State income tax bands
{{#if state.ratesSource}}<small><a {{bind-attr href=state.ratesSource}} target="_blank">(source)</a></small>{{/if}}
</h4>
{{tax-bands countryOrState=state currencyCode=currencyCode}}
{{else}}
<h4>States</h4>
<ul>
{{#each states}}
<li>{{#link-to 'details_state' country.slug slug}}{{name}}{{/link-to}}</li>
{{/each}}
</ul>
{{/if}}
{{else}}
<h4>
Income tax bands
{{#if ratesSource}}<small><a {{bind-attr href=ratesSource}} target="_blank">(source)</a></small>{{/if}}
</h4>
{{tax-bands countryOrState=country currencyCode=currencyCode}}
{{/if}}
</div>
<div class="col-sm-8">
<h4>Sample rates</h4>
{{sample-rates countryOrState=countryOrState currencyCode=currencyCode}}
</div>
</div>
<h3>Living</h3>
{{country-climate climate=climate}}
{{country-rating name="crime" rating=ratings.crime}}
{{country-rating name="prices" rating=ratings.prices}}
{{country-rating name="business" rating=ratings.business}}
{{country-rating name="corruption" rating=ratings.corruption}}
<h3>Immigration</h3>
<div class="row">
<div class="col-sm-4">
{{#bs-panel}}{{partial 'immigration_worker'}}{{/bs-panel}}
</div>
<div class="col-sm-4">
{{#bs-panel}}{{partial 'immigration_investor'}}{{/bs-panel}}
</div>
<div class="col-sm-4">
{{#bs-panel}}{{partial 'immigration_business'}}{{/bs-panel}}
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="components/country-climate">
{{#if climate}}{{#with climate as c}}
<p>
Climate: {{subj-climate climate=c}} — average high: <b>{{c.high}}°C</b>, low: <b>{{c.low}}°C</b>, rainy days: <b>{{c.rainyDays}}</b>
</p>
{{/with}}{{/if}}
</script>
<script type="text/x-handlebars" data-template-name="components/country-rating">
{{#if rating}}
<p>
{{label}}: {{subj-rating name=name rating=rating}}
<a {{bind-attr href="source"}} target="_blank">(source)</a>
</p>
{{/if}}
</script>
<script type="text/x-handlebars" data-template-name="components/visa-card">
{{#with visa as v}}
<h4 class="text-center">
{{title}}
{{check-mark value=v}}
</h4>
{{#if v}}
{{yield v=v}}
{{#if v.specialConditions}}
<h5 class="text-center">Special conditions</h5>
<ul>{{#each v.specialConditions}}<li>{{this}}</li>{{/each}}</ul>
{{/if}}
{{#if v.source}}<p class="text-center"><small><a {{bind-attr href=v.source}} target="_blank">(source)</a></small></p>{{/if}}
{{/if}}
{{/with}}
</script>
<script type="text/x-handlebars" data-template-name="_immigration_worker">
{{#with immigration.work as v}}
{{#visa-card visa=v title="Worker visa"}}
<p>Degree required: <b>{{yesno v.degreeReq}}</b></p>
<p>Can apply for permanent residence: <b>{{yesno v.canApplyForPR}}</b></p>
<p>Yearly quota: <b>{{#if v.quota}}{{v.quota}}{{else}}—{{/if}}</b></p>
{{/visa-card}}
{{/with}}
</script>
<script type="text/x-handlebars" data-template-name="_immigration_investor">
{{#with immigration.investment as v}}
{{#visa-card visa=v title="Investor visa"}}
<p>Min. investment amount: <b>{{multi-money v.minAmount code currencyCode}}</b></p>
<p>Min. jobs maintained: <b>{{#if v.minJobs}}{{v.minJobs}}{{else}}—{{/if}}</b></p>
<p>Years before unconditional permanent residence: <b>{{#if v.yearsBeforePR}}{{v.yearsBeforePR}}{{else}}—{{/if}}</b></p>
<p>Years before citizenship: <b>{{#if v.yearsBeforeCitizenship}}{{v.yearsBeforeCitizenship}}{{else}}—{{/if}}</b></p>
{{/visa-card}}
{{/with}}
</script>
<script type="text/x-handlebars" data-template-name="_immigration_business">
{{#with immigration.business as v}}
{{#visa-card visa=v title="Business visa"}}
<p>Min. paid-up capital: <b>{{multi-money v.minCapital code currencyCode}}</b></p>
<p>Min. share in company: <b>{{#if v.minShare}}{{rawPercent v.minShare}}{{else}}—{{/if}}</b></p>
<p>Stay (days per year) required before PR: <b>{{#if v.stayReq}}{{v.stayReq}}{{else}}—{{/if}}</b></p>
<p>Years before unconditional permanent residence: <b>{{#if v.yearsBeforePR}}{{v.yearsBeforePR}}{{else}}—{{/if}}</b></p>
{{/visa-card}}
{{/with}}
</script>
<script type="text/x-handlebars" data-template-name="components/check-mark">
{{#if value}}✓{{else}}✗{{/if}}
</script>
<script type="text/x-handlebars" data-template-name="components/bs-panel">
<div class="panel-body">
{{yield}}
</div>
</script>
<script>
EmberENV = {
FEATURES: {
'query-params-new': true
}
};
</script>
<script src="vendor.js"></script>
<script src="app.js"></script>
<script type="text/javascript">
require('init');
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '4f163154cb25bc723500000c');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
</body>
</html>