ish_manager 0.1.8.410 → 0.1.8.411

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8324ef683622d8aca6298965f060b9f7bb28c8d2ec6bbd99011b34914ccd6b70
4
- data.tar.gz: af207371888cee567d554cb1f0313fd717399dd42c93fc9b06f3b16fca0212fa
3
+ metadata.gz: 8b9d3de89ed743dad854899b10bcc63d1ba88105cf3fcb2f456c56890f6cc508
4
+ data.tar.gz: c730a3640e159a49741dfcf67e730afa1c96239c629ddda5b25054658876a108
5
5
  SHA512:
6
- metadata.gz: 01d1fa18a16bcf11c0f991972eae21b57ed17024b33da5249d5396f85c812e8644448547f2fed3164ba565ee2daa89205b8b047e56d6727ee3f759b51f641d29
7
- data.tar.gz: bae46a73d36c3bcdfd0f098fd9d75f2e86cab52f6e50a0b8c8eb07810b64ba0f2195f80e51fe87f5af0c4d02974d923612fd74ec7b63d1b2c7f3b83dffde2548
6
+ metadata.gz: fee4975f888a5d2ee1199f2ab7b912b1ceee306748ef7bc0c97489034b4740063ac00441b13f4f6319fb3ca870e24d5d28079af7abb5536d3ff2998f9a9f8729
7
+ data.tar.gz: 53c327afd46d0494efffb26b658edeb2269a9b80718f8f6ef5f0fa341ff8b6b3a4e2ac2d2e3b9034fce2cc80089ef2731ab6f27875619fa0edca63cfd4e755de
@@ -25,6 +25,7 @@
25
25
  //= require ish_manager/email_conversations
26
26
  //= require ish_manager/email_templates
27
27
  //= require ish_manager/galleries
28
+ //= require ish_manager/iro
28
29
 
29
30
  const AppRouter = {
30
31
  gallery_update_ordering_path: ({ id, slug }) => `/manager/galleries/${slug || id}/update_ordering`,
@@ -0,0 +1,51 @@
1
+
2
+ $(document).ready(function () {
3
+
4
+ const origin = 23
5
+ scale = 200 // pixels per dollar
6
+
7
+
8
+
9
+ $(".gameuiW").each( function (idx, w) {
10
+
11
+ let ccStrike = $(w).data('ccStrike')
12
+ let ccStartPrice = $(w).data('ccStartprice') // e.g. 0.88
13
+ let ccCurrentPrice = $(w).data('ccCurrentprice')
14
+ let cUS = $(w).data('cus')
15
+
16
+ $(".c-u-s").each(function (idx, elem) {
17
+ $(elem).html(cUS)
18
+ })
19
+
20
+ $(".windW").each(function (idx, elem) {
21
+ $(elem).css('left', (origin - cUS)*scale)
22
+ })
23
+
24
+ $($(w).find('.elephantW')).css('left', (origin - ccStrike)* scale )
25
+ $(w).find('.elephantC > .amount').html( " $" + ccStrike )
26
+ $(w).find('.riderStart > .amount').html( " $" + ccStartPrice )
27
+ $(w).find('.riderStart').css('width', scale * ccStartPrice )
28
+ $(w).find('.riderStart').css('left', -1 * scale * ccStartPrice )
29
+ $(w).find('.riderStart2').css('width', scale * ccStartPrice )
30
+
31
+ let currentAmount = ((ccStartPrice - ccCurrentPrice)*100).toPrecision(1)/100
32
+ let ccCurrentGain = ccStartPrice - ccCurrentPrice
33
+ // logg(ccCurrentGain, 'ccCurrentGain')
34
+ // logg(currentAmount, 'currentAmount')
35
+ $(w).find('.riderCurrent > .amount').html( " $" + currentAmount )
36
+ let ans = `${-1*ccCurrentGain*scale}px`
37
+ logg(ans, 'ans')
38
+ $(w).find('.riderW').css('left', ans)
39
+
40
+ if (ccCurrentGain > 0) {
41
+ $(w).find('.riderCurrent').css('width', scale * ccCurrentGain )
42
+ } else {
43
+ ccCurrentGain = -1 * ccCurrentGain
44
+ $(w).find('.riderCurrent').css('width', scale * ccCurrentGain )
45
+ $(w).find('.riderCurrent').css('background', 'red')
46
+ $(w).find('.riderCurrent').css('right', `-${ccCurrentGain*scale}px`)
47
+ $(w).find('.rider').addClass('riderF')
48
+ }
49
+ })
50
+
51
+ })
@@ -155,6 +155,44 @@ table.bordered {
155
155
  text-align: center;
156
156
  }
157
157
 
158
+ .chip,
159
+ // .main-header a.chip,
160
+ ._ {
161
+ margin-right: 20px;
162
+ // border: 1px solid black;
163
+
164
+ border-radius: 1em 0 0 1em;
165
+ padding-left: .6em;
166
+
167
+ background: white;
168
+ position: relative;
169
+
170
+
171
+
172
+ &::after {
173
+ // border: 1px solid red;
174
+
175
+ content: "";
176
+
177
+ position: absolute;
178
+ right: -30px;
179
+ width: 10px;
180
+ display: block;
181
+ // background: inherit;
182
+ // background: red;
183
+ margin: 0 20px;
184
+ top: -1px;
185
+ bottom: 0;
186
+
187
+ border-top: 16px solid white;
188
+ border-bottom: 16px solid white;
189
+
190
+ border-right: 10px solid transparent;
191
+
192
+ // border: 1px solid red;
193
+ }
194
+ }
195
+
158
196
  .close {
159
197
  position: absolute;
160
198
  top: 0;
@@ -113,223 +113,328 @@
113
113
  }
114
114
  }
115
115
 
116
+
117
+
118
+
119
+
120
+
121
+
122
+ /*
123
+ * GameUI in Purse
124
+ **/
116
125
  .gameuiW {
117
- border: 1px solid cyan;
118
- border-radius: 0.5em;
126
+ border: 1px solid #ff9966;
127
+ border-radius: 1em;
119
128
 
120
129
  position: relative;
121
130
 
122
- margin-bottom: 100px;
123
-
124
- width: 1000px;
131
+ width: 1200px;
125
132
  height: 200px;
126
133
 
134
+ margin-bottom: 10px;
135
+
127
136
  z-index: 0;
128
137
 
129
- .elephant {
130
- // border: 2px solid yellow;
138
+ .gameui {
131
139
 
132
- background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04103931/200x125-elephant-1rmTiny.png');
133
- width: 200px;
134
- height: 125px;
140
+ border-left: 1px dashed black;
135
141
 
136
142
  position: absolute;
137
143
 
138
- left: 700px;
139
- bottom: 0;
144
+ height: 100%;
145
+ left: 50%;
146
+ width: 600px;
147
+
148
+ .gameuiC {
149
+ // border: 2px solid red;
150
+
151
+ background-color: brown;
140
152
 
141
- &::after { /* arrow-up */
142
- content: "";
143
153
  position: absolute;
154
+
155
+ right: 0;
156
+ left: 0;
144
157
  bottom: 0;
145
- right: calc( 50% - 25px );
158
+ height: 10px;
146
159
 
147
- width: 0;
148
- height: 0;
149
- border-left: 25px solid transparent;
150
- border-right: 25px solid transparent;
160
+ &::before {
161
+ content: "24";
162
+ color: white;
163
+ position: absolute;
164
+ left: -200px;
165
+ width: 200px;
166
+ height: 2px;
167
+ background: white;
168
+ }
169
+ &::after {
170
+ content: "22";
171
+ color: white;
172
+ position: absolute;
173
+ left: 200px;
174
+ width: 200px;
175
+ height: 2px;
176
+ background: white;
177
+ }
178
+ }
151
179
 
152
- border-bottom: 25px solid red;
180
+ .elephantW {
181
+ border: 2px solid black;
182
+ position: absolute;
183
+ // left: ?? ; /* data: cc strike */
153
184
  }
154
- }
155
185
 
156
- .elephantNext {
157
- // border: 5px solid white;
158
- border-radius: 50%;
186
+ .elephant {
187
+ // border: 2px solid yellow;
159
188
 
160
- display: none;
189
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04103931/200x125-elephant-1rmTiny.png');
190
+ width: 200px;
191
+ height: 125px;
161
192
 
162
- position: absolute;
163
- bottom: -50px;
164
- margin-left: 50px;
165
- transform: scale(1.2);
166
- opacity: 0.33;
167
- background-color: green;
193
+ position: absolute;
168
194
 
169
- }
195
+ left: -100px;
196
+ padding-left: 100px;
197
+ bottom: 0;
170
198
 
171
- .grid {
172
- background: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04110701/500x250-gridTiny.png');
173
- background-size: 100%;
174
- background-position: bottom center;
199
+ &::after { /* arrow-up */
200
+ content: "";
201
+ position: absolute;
202
+ bottom: 0;
203
+ right: calc( 50% - 25px );
175
204
 
176
- width: 1000px;
177
- height: 200px;
205
+ width: 0;
206
+ height: 0;
207
+ border-left: 25px solid transparent;
208
+ border-right: 25px solid transparent;
178
209
 
179
- position: absolute;
180
- bottom: 0;
181
- left: 0;
210
+ border-bottom: 25px solid red;
211
+ }
182
212
 
183
- z-index: -1;
184
- }
213
+ .elephantC {
214
+ // border: 10px solid black;
185
215
 
186
- .ground {
187
- border-bottom: 5px solid gray;
216
+ // width: 10px;
217
+ // height: 10px;
188
218
 
189
- position: absolute;
190
- left: 0;
191
- right: 0;
192
- top: 100%;
193
- bottom: -50px;
219
+ z-index: 1;
220
+ position: absolute;
221
+ color: #333;
222
+ background: #ddd;
223
+ display: inline-block;
194
224
 
195
- background: gray;
196
- }
225
+ .q {
226
+ border: 2px solid #eee;
227
+ color: #fff;
228
+ background: #ccc;
229
+ padding: 0.4em;
230
+ border-radius: 50%;
197
231
 
198
- .groundedW {
199
- position: absolute;
232
+ position: absolute;
233
+ left: 50px;
234
+ top: -25px;
235
+ }
236
+ }
200
237
 
201
- right: -250px;
202
- bottom: 0;
203
238
 
204
- .grounded {
205
- border: 2px solid pink;
206
- background: rgba(255,255,255, 0.75);
239
+ }
240
+
241
+ .elephantNext {
242
+ // border: 5px solid white;
207
243
  border-radius: 50%;
208
244
 
209
- width: 100px;
210
- height: 100px;
245
+ display: none;
211
246
 
212
- background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04105933/200x200-spearman-rmTiny.png');
213
- background-size: cover;
247
+ position: absolute;
248
+ bottom: -50px;
249
+ margin-left: 50px;
250
+ transform: scale(1.2);
251
+ opacity: 0.33;
252
+ background-color: green;
253
+ }
214
254
 
215
- .groundedStart {
216
- // border: 2px solid white;
217
- position: absolute;
218
- background: #999;
219
- bottom: 50px;
220
- top: 11px;
221
- left: 50%;
222
- right: -40px;
255
+ .groundedW {
256
+ position: absolute;
223
257
 
224
- z-index: -1;
225
- }
258
+ right: -250px;
259
+ bottom: 0;
226
260
 
227
- .groundedCurrent {
228
- position: absolute;
229
- background: red;
230
- bottom: 45px;
231
- top: 52px;
232
- left: 50%;
233
- right: -30px;
261
+ .grounded {
262
+ border: 2px solid pink;
263
+ background: rgba(255,255,255, 0.75);
264
+ border-radius: 50%;
265
+
266
+ width: 100px;
267
+ height: 100px;
268
+
269
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04105933/200x200-spearman-rmTiny.png');
270
+ background-size: cover;
271
+
272
+ .groundedStart {
273
+ // border: 2px solid white;
274
+ position: absolute;
275
+ background: #999;
276
+ bottom: 50px;
277
+ top: 11px;
278
+ left: 50%;
279
+ right: -40px;
280
+
281
+ z-index: -1;
282
+ }
283
+
284
+ .groundedCurrent {
285
+ position: absolute;
286
+ background: red;
287
+ bottom: 45px;
288
+ top: 52px;
289
+ left: 50%;
290
+ right: -30px;
291
+ }
234
292
  }
235
293
  }
236
- }
237
294
 
238
- .spearmanW {
239
- border: 2px solid yellow;
295
+ .riderCurrent {
296
+ display: none;
240
297
 
241
- position: absolute;
242
- display: inline-block;
298
+ position: absolute;
299
+ background: #339933;
300
+ bottom: -7px;
301
+ height: 5px;
302
+ right: 0;
303
+ // width: 105px;
243
304
 
244
- left: 800px;
305
+ }
306
+ .riderStart {
307
+ // border: 2px solid #cc33ff;
308
+ border-right: 2px solid #cc33ff;
245
309
 
246
- .spearman {
247
- // border: 2px solid orange;
248
- background: rgba(255,255,255, 0.75);
249
- border-radius: 50%;
310
+ position: absolute;
311
+ background: #999;
312
+ // background: red;
313
+ bottom: 50px;
314
+ height: 35px;
315
+ // right: 50px;
316
+ // right: 0;
317
+ bottom: 50px;
318
+ // width: 176px;
319
+ // left: 0;
320
+
321
+ z-index: -1;
322
+ }
250
323
 
251
- background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04105933/200x200-spearman-rmTiny.png');
252
- background-size: cover;
324
+ .riderStart2 {
325
+ // border: 2px solid #30033f;
326
+
327
+ position: absolute;
328
+ background: #999;
329
+ // background: red;
330
+ bottom: 50px;
331
+ height: 35px;
332
+ // right: 50px;
333
+ right: left;
334
+ bottom: 50px;
335
+ // width: 176px;
336
+ // left: 0;
337
+
338
+ z-index: -1;
339
+ }
253
340
 
254
- width: 100px;
255
- height: 100px;
341
+ .riderW {
342
+ // border: 2px solid yellow;
256
343
 
257
344
  position: absolute;
258
- left: -50px;
259
345
 
260
- // &::after { /* arrow-up */
261
- // content: "";
262
- // position: absolute;
263
- // bottom: 0;
264
- // right: calc( 50% - 25px );
346
+ left: 0;
347
+ top: 20px;
265
348
 
266
- // width: 0;
267
- // height: 0;
268
- // border-left: 25px solid transparent;
269
- // border-right: 25px solid transparent;
349
+ .rider {
350
+ // border: 2px solid orange;
270
351
 
271
- // border-bottom: 25px solid red;
272
- // }
352
+ // background: rgba(255,255,255, 0.5);
353
+ border-radius: 50%;
354
+
355
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04105933/200x200-spearman-rmTiny.png');
356
+ background-size: cover;
273
357
 
274
- .spearmanStart {
275
358
  position: absolute;
276
- background: #999;
277
- bottom: 50px;
278
- top: 11px;
279
- right: 50%;
280
- left: -134px;
359
+ width: 100px;
360
+ left: -50px;
361
+ height: 100px;
362
+ bottom: 0;
363
+ padding-left: 50px;
364
+ padding-top: 50px;
281
365
 
282
- z-index: -1;
283
- }
284
366
 
285
- .spearmanCurrent {
286
- position: absolute;
287
- background: red;
288
- bottom: 45px;
289
- top: 52px;
290
- right: 50%;
291
- left: -97px;
367
+
368
+ .riderC {
369
+ border: 6px solid white;
370
+ border-radius: 6px;
371
+
372
+ position: absolute;
373
+ left: calc( 50% - 6px );
374
+ bottom: calc( 50% - 6px );
375
+
376
+ }
292
377
  }
293
- }
294
- }
295
378
 
296
- .windW {
297
- // border: 2px solid blue;
379
+ .riderF {
380
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/05142539/200x200-spearman-rmFTiny.png');
381
+ }
298
382
 
299
- position: absolute;
300
- left: 910px; /* ( <price> - 20 ) * 200 */
301
- bottom: 0;
383
+ }
302
384
 
303
- &::after { /* arrow-up */
304
- border-bottom: 25px solid yellow;
385
+ .windW {
386
+ border: 2px solid blue;
305
387
 
306
- content: "";
307
388
  position: absolute;
389
+ left: 232px; /* Data: current underlying strike */
308
390
  bottom: 0;
309
- // right: 50%;
310
- left: -25px;
311
391
 
312
- // width: 0;
313
- // height: 0;
314
- border-left: 25px solid transparent;
315
- border-right: 25px solid transparent;
316
- }
317
392
 
318
- .wind {
393
+ &::before { /* arrow-up */
394
+ border-bottom: 25px solid yellow;
319
395
 
320
- background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04104623/200x200-windTiny.png');
321
- background-position: bottom center;
396
+ content: "";
397
+ position: absolute;
398
+ bottom: 0;
399
+ left: -25px;
400
+ z-index: 1;
322
401
 
323
- opacity: 0.5;
402
+ border-left: 25px solid transparent;
403
+ border-right: 25px solid transparent;
404
+ }
324
405
 
325
- width: 200px;
326
- height: 200px;
406
+ .wind {
407
+ // border: 2px solid green;
327
408
 
328
- margin-left: -25px;
409
+ display: flex;
410
+ flex-direction: column-reverse;
411
+
412
+ .c-u-s {
413
+ position: relative;
414
+ z-index: 2;
415
+
416
+ background: #333;
417
+ color: white;
418
+ display: inline-block
419
+ }
420
+
421
+ .windC {
422
+ // border: 1px solid red;
329
423
 
330
- .windC {
424
+ position: absolute;
425
+ bottom: 0;
426
+ left: 0;
427
+
428
+ background-image: url('https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2023/04/04104623/200x200-windTiny.png');
429
+ background-position: bottom center;
430
+ margin-left: -25px;
431
+
432
+ opacity: 0.5;
433
+
434
+ width: 200px;
435
+ height: 200px;
436
+ }
331
437
  }
332
438
  }
333
439
  }
334
-
335
440
  }
@@ -43,7 +43,7 @@ class ::IshManager::IroPursesController < IshManager::ApplicationController
43
43
  @positions = @purse.positions.order({ expires_on: :asc, strike: :asc })
44
44
  @positions.map &:refresh
45
45
 
46
- render @purse.parsed_config[:kind] || 'show'
46
+ render @purse.parsed_config[:kind] || params[:kind] || 'show'
47
47
  end
48
48
 
49
49
  def update
@@ -61,6 +61,7 @@ module IshManager
61
61
  "$ #{'%.2f' % a}"
62
62
  end
63
63
  def pp_money a; pp_amount a; end
64
+ def pp_currency a; pp_amount a; end
64
65
  def pp_percent a
65
66
  "#{(a*100).round(2)}%"
66
67
  end
@@ -52,7 +52,8 @@
52
52
  .a
53
53
  %ul
54
54
  %li
55
- = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX)
55
+ .chip
56
+ = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX)
56
57
  = link_to '[+]', new_email_context_path
57
58
  %li
58
59
  = link_to "Templates (#{Ish::EmailTemplate.all.count})", email_templates_path
@@ -97,6 +98,7 @@
97
98
  %span.label Purses:
98
99
  - Iro::Purse.all.map do |p|
99
100
  = link_to "[#{p.id}]", iro_purse_path(p)
101
+ = link_to "[gui]", iro_purse_gameui_path(p)
100
102
  = link_to '[+]', new_iro_purse_path
101
103
  %li
102
104
  = link_to 'Watches', iro_watches_path
@@ -1,5 +1,5 @@
1
1
 
2
- .iro-purses-show.padded
2
+ .iro-purses-show-shameui.padded
3
3
  .max-width
4
4
  .header
5
5
  %h4.title
@@ -22,34 +22,56 @@
22
22
  -# <pre>#{JSON.pretty_generate( strat.display_attrs )}</pre>
23
23
  .strategy.item= render 'ish_manager/iro_strategies/form', strategy: strat
24
24
 
25
- %h5.collapse-expand#gameuiPositions1
25
+ %h5.collapse-expand#gameuiPositions
26
26
  Gameui Positions (#{@positions.length})
27
27
  = link_to '[+]', new_iro_position_path({ iro_purse_id: @purse.id })
28
- .gameuiW
29
- .gameui
30
- .gameuiC
31
-
32
-
33
- .elephant
34
- .windW
35
- .wind
36
- .windC
37
- .ground
38
- .grid
39
- .spearmanW
40
- .spearman
41
- .spearmanStart
42
- .spearmanCurrent
43
- .groundedW
44
- .grounded
45
- .groundedC
46
- .groundedStart
47
- .groundedCurrent
48
-
49
- .elephant.elephantNext
50
-
51
-
52
- %h5.collapse-expand#positions2
28
+
29
+ .gameui-positions
30
+ - @positions.each do |p|
31
+
32
+ -# something like, $23 Apr-14
33
+ .gameuiW.show-amounts{ data: { cc: { strike: p.strike, startPrice: p.opened_price, currentPrice: p.current_price, cus: p.strategy.current_underlying_strike } } }
34
+ .gameui
35
+ .gameuiC
36
+
37
+ .elephantW
38
+ .elephant
39
+ .elephantC
40
+
41
+ .amount
42
+
43
+ .q= p.quantity
44
+
45
+ .riderW
46
+ .rider
47
+ .riderC
48
+
49
+ .riderStart
50
+ .amount
51
+ .riderCurrent
52
+ .amount
53
+ .riderStart2
54
+
55
+ .sunflowerW
56
+ .sunflower
57
+ .sunflowerC
58
+
59
+ .days-left= (p.expires_on.to_date - Time.now.to_date).to_i
60
+
61
+ .windW
62
+ .wind
63
+ .c-u-s= pp_currency p.strategy.current_underlying_strike
64
+ .windC
65
+
66
+
67
+ .spearW
68
+ .spear
69
+ .spearC
70
+ .spearStart
71
+ .spearCurrent
72
+
73
+
74
+ %h5.collapse-expand#spreadsheetPositions
53
75
  Positions (#{@positions.length})
54
76
  = link_to '[+]', new_iro_position_path({ iro_purse_id: @purse.id })
55
77
  .positions
data/config/routes.rb CHANGED
@@ -28,6 +28,7 @@ IshManager::Engine.routes.draw do
28
28
 
29
29
  resources :iro_watches
30
30
 
31
+ get 'iro_purses/:id/show-gameui', to: 'iro_purses#show', as: :iro_purse_gameui, defaults: { kind: 'show_gameui' }
31
32
  resources :iro_purses
32
33
 
33
34
  resources :iro_strategies
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.410
4
+ version: 0.1.8.411
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -251,6 +251,7 @@ files:
251
251
  - app/assets/javascripts/ish_manager/email_conversations.js
252
252
  - app/assets/javascripts/ish_manager/email_templates.js
253
253
  - app/assets/javascripts/ish_manager/galleries.js
254
+ - app/assets/javascripts/ish_manager/iro.js
254
255
  - app/assets/javascripts/ish_manager/maps.js
255
256
  - app/assets/javascripts/ish_manager/shared.js
256
257
  - app/assets/javascripts/ish_manager/vendor/bootstrap.min.js