bootstrap-material-theme 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE +32 -0
  5. data/README.md +59 -0
  6. data/Rakefile +1 -0
  7. data/app/assets/fonts/LICENSE.txt +428 -0
  8. data/app/assets/fonts/Material-Design-Icons.eot +0 -0
  9. data/app/assets/fonts/Material-Design-Icons.svg +769 -0
  10. data/app/assets/fonts/Material-Design-Icons.ttf +0 -0
  11. data/app/assets/fonts/Material-Design-Icons.woff +0 -0
  12. data/app/assets/javascripts/bootstrap-material-design/index.js +4 -0
  13. data/app/assets/javascripts/bootstrap-material-design/jquery.nouislider.js +668 -0
  14. data/app/assets/javascripts/bootstrap-material-design/material.js +227 -0
  15. data/app/assets/javascripts/bootstrap-material-design/ripples.js +324 -0
  16. data/app/assets/javascripts/bootstrap-material-design/snackbar.js +153 -0
  17. data/app/assets/stylesheets/_bootstrap-material-design.scss +3 -0
  18. data/app/assets/stylesheets/bootstrap-material-design/index.css +5 -0
  19. data/app/assets/stylesheets/bootstrap-material-design/material.css.erb +8209 -0
  20. data/app/assets/stylesheets/bootstrap-material-design/ripples.css +35 -0
  21. data/app/assets/stylesheets/bootstrap-material-design/snackbar.css +35 -0
  22. data/bootstrap-material-design.gemspec +21 -0
  23. data/lib/bootstrap-material-design.rb +3 -0
  24. data/lib/bootstrap-material-design/engine.rb +4 -0
  25. data/test/dummy_app/Gemfile +14 -0
  26. data/test/dummy_app/README.rdoc +3 -0
  27. data/test/dummy_app/Rakefile +6 -0
  28. data/test/dummy_app/app/assets/images/.keep +0 -0
  29. data/test/dummy_app/app/assets/images/download.png +0 -0
  30. data/test/dummy_app/app/assets/images/gittip.png +0 -0
  31. data/test/dummy_app/app/assets/images/issue.png +0 -0
  32. data/test/dummy_app/app/assets/javascripts/application.js +18 -0
  33. data/test/dummy_app/app/assets/javascripts/bootstrap.js.coffee +3 -0
  34. data/test/dummy_app/app/assets/stylesheets/application.css +16 -0
  35. data/test/dummy_app/app/assets/stylesheets/bootstrap-md.css.scss +187 -0
  36. data/test/dummy_app/app/controllers/application_controller.rb +5 -0
  37. data/test/dummy_app/app/controllers/bootstrap_controller.rb +4 -0
  38. data/test/dummy_app/app/controllers/concerns/.keep +0 -0
  39. data/test/dummy_app/app/helpers/application_helper.rb +2 -0
  40. data/test/dummy_app/app/helpers/bootstrap_helper.rb +2 -0
  41. data/test/dummy_app/app/mailers/.keep +0 -0
  42. data/test/dummy_app/app/models/.keep +0 -0
  43. data/test/dummy_app/app/models/concerns/.keep +0 -0
  44. data/test/dummy_app/app/views/bootstrap/index.html.erb +3160 -0
  45. data/test/dummy_app/app/views/layouts/application.html.erb +16 -0
  46. data/test/dummy_app/bin/bundle +3 -0
  47. data/test/dummy_app/bin/rails +4 -0
  48. data/test/dummy_app/bin/rake +4 -0
  49. data/test/dummy_app/config.ru +4 -0
  50. data/test/dummy_app/config/application.rb +23 -0
  51. data/test/dummy_app/config/boot.rb +4 -0
  52. data/test/dummy_app/config/database.yml +25 -0
  53. data/test/dummy_app/config/environment.rb +5 -0
  54. data/test/dummy_app/config/environments/development.rb +37 -0
  55. data/test/dummy_app/config/environments/production.rb +78 -0
  56. data/test/dummy_app/config/environments/test.rb +39 -0
  57. data/test/dummy_app/config/initializers/assets.rb +8 -0
  58. data/test/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
  59. data/test/dummy_app/config/initializers/cookies_serializer.rb +3 -0
  60. data/test/dummy_app/config/initializers/filter_parameter_logging.rb +4 -0
  61. data/test/dummy_app/config/initializers/inflections.rb +16 -0
  62. data/test/dummy_app/config/initializers/mime_types.rb +4 -0
  63. data/test/dummy_app/config/initializers/session_store.rb +3 -0
  64. data/test/dummy_app/config/initializers/wrap_parameters.rb +14 -0
  65. data/test/dummy_app/config/locales/en.yml +23 -0
  66. data/test/dummy_app/config/routes.rb +59 -0
  67. data/test/dummy_app/config/secrets.yml +22 -0
  68. data/test/dummy_app/db/development.sqlite3 +0 -0
  69. data/test/dummy_app/db/seeds.rb +7 -0
  70. data/test/dummy_app/lib/assets/.keep +0 -0
  71. data/test/dummy_app/lib/tasks/.keep +0 -0
  72. data/test/dummy_app/public/404.html +67 -0
  73. data/test/dummy_app/public/422.html +67 -0
  74. data/test/dummy_app/public/500.html +66 -0
  75. data/test/dummy_app/public/favicon.ico +0 -0
  76. data/test/dummy_app/public/robots.txt +5 -0
  77. metadata +186 -0
@@ -0,0 +1,4 @@
1
+ //= require ./jquery.nouislider
2
+ //= require ./material
3
+ //= require ./ripples
4
+ //= require ./snackbar
@@ -0,0 +1,668 @@
1
+ /*
2
+
3
+ $.Link (part of noUiSlider) - WTFPL */
4
+ (function(c) {
5
+ function m(a, c, d) {
6
+ if ((a[c] || a[d]) && a[c] === a[d]) throw Error("(Link) '" + c + "' can't match '" + d + "'.'");
7
+ }
8
+
9
+ function r(a) {
10
+ void 0 === a && (a = {});
11
+ if ("object" !== typeof a) throw Error("(Format) 'format' option must be an object.");
12
+ var h = {};
13
+ c(u).each(function(c, n) {
14
+ if (void 0 === a[n]) h[n] = A[c];
15
+ else if (typeof a[n] === typeof A[c]) {
16
+ if ("decimals" === n && (0 > a[n] || 7 < a[n])) throw Error("(Format) 'format.decimals' option must be between 0 and 7.");
17
+ h[n] = a[n]
18
+ } else throw Error("(Format) 'format." + n + "' must be a " + typeof A[c] +
19
+ ".");
20
+ });
21
+ m(h, "mark", "thousand");
22
+ m(h, "prefix", "negative");
23
+ m(h, "prefix", "negativeBefore");
24
+ this.r = h
25
+ }
26
+
27
+ function k(a, h) {
28
+ "object" !== typeof a && c.error("(Link) Initialize with an object.");
29
+ return new k.prototype.p(a.target || function() {}, a.method, a.format || {}, h)
30
+ }
31
+ var u = "decimals mark thousand prefix postfix encoder decoder negative negativeBefore to from".split(" "),
32
+ A = [2, ".", "", "", "", function(a) {
33
+ return a
34
+ }, function(a) {
35
+ return a
36
+ }, "-", "", function(a) {
37
+ return a
38
+ }, function(a) {
39
+ return a
40
+ }];
41
+ r.prototype.a = function(a) {
42
+ return this.r[a]
43
+ };
44
+ r.prototype.L = function(a) {
45
+ function c(a) {
46
+ return a.split("").reverse().join("")
47
+ }
48
+ a = this.a("encoder")(a);
49
+ var d = this.a("decimals"),
50
+ n = "",
51
+ k = "",
52
+ m = "",
53
+ r = "";
54
+ 0 === parseFloat(a.toFixed(d)) && (a = "0");
55
+ 0 > a && (n = this.a("negative"), k = this.a("negativeBefore"));
56
+ a = Math.abs(a).toFixed(d).toString();
57
+ a = a.split(".");
58
+ this.a("thousand") ? (m = c(a[0]).match(/.{1,3}/g), m = c(m.join(c(this.a("thousand"))))) : m = a[0];
59
+ this.a("mark") && 1 < a.length && (r = this.a("mark") + a[1]);
60
+ return this.a("to")(k + this.a("prefix") + n + m + r + this.a("postfix"))
61
+ };
62
+ r.prototype.w =
63
+ function(a) {
64
+ function c(a) {
65
+ return a.replace(/[\-\/\\\^$*+?.()|\[\]{}]/g, "\\$&")
66
+ }
67
+ var d;
68
+ if (null === a || void 0 === a) return !1;
69
+ a = this.a("from")(a);
70
+ a = a.toString();
71
+ d = a.replace(RegExp("^" + c(this.a("negativeBefore"))), "");
72
+ a !== d ? (a = d, d = "-") : d = "";
73
+ a = a.replace(RegExp("^" + c(this.a("prefix"))), "");
74
+ this.a("negative") && (d = "", a = a.replace(RegExp("^" + c(this.a("negative"))), "-"));
75
+ a = a.replace(RegExp(c(this.a("postfix")) + "$"), "").replace(RegExp(c(this.a("thousand")), "g"), "").replace(this.a("mark"), ".");
76
+ a = this.a("decoder")(parseFloat(d +
77
+ a));
78
+ return isNaN(a) ? !1 : a
79
+ };
80
+ k.prototype.K = function(a, h) {
81
+ this.method = h || "html";
82
+ this.j = c(a.replace("-tooltip-", "") || "<div/>")[0]
83
+ };
84
+ k.prototype.H = function(a) {
85
+ this.method = "val";
86
+ this.j = document.createElement("input");
87
+ this.j.name = a;
88
+ this.j.type = "hidden"
89
+ };
90
+ k.prototype.G = function(a) {
91
+ function h(a, c) {
92
+ return [c ? null : a, c ? a : null]
93
+ }
94
+ var d = this;
95
+ this.method = "val";
96
+ this.target = a.on("change", function(a) {
97
+ d.B.val(h(c(a.target).val(), d.t), {
98
+ link: d,
99
+ set: !0
100
+ })
101
+ })
102
+ };
103
+ k.prototype.p = function(a, h, d, k) {
104
+ this.g = d;
105
+ this.update = !k;
106
+ if ("string" ===
107
+ typeof a && 0 === a.indexOf("-tooltip-")) this.K(a, h);
108
+ else if ("string" === typeof a && 0 !== a.indexOf("-")) this.H(a);
109
+ else if ("function" === typeof a) this.target = !1, this.method = a;
110
+ else {
111
+ if (a instanceof c || c.zepto && c.zepto.isZ(a)) {
112
+ if (!h) {
113
+ if (a.is("input, select, textarea")) {
114
+ this.G(a);
115
+ return
116
+ }
117
+ h = "html"
118
+ }
119
+ if ("function" === typeof h || "string" === typeof h && a[h]) {
120
+ this.method = h;
121
+ this.target = a;
122
+ return
123
+ }
124
+ }
125
+ throw new RangeError("(Link) Invalid Link.");
126
+ }
127
+ };
128
+ k.prototype.write = function(a, c, d, k) {
129
+ if (!this.update || !1 !== k)
130
+ if (this.u = a, this.F = a =
131
+ this.format(a), "function" === typeof this.method) this.method.call(this.target[0] || d[0], a, c, d);
132
+ else this.target[this.method](a, c, d)
133
+ };
134
+ k.prototype.q = function(a) {
135
+ this.g = new r(c.extend({}, a, this.g instanceof r ? this.g.r : this.g))
136
+ };
137
+ k.prototype.J = function(a) {
138
+ this.B = a
139
+ };
140
+ k.prototype.I = function(a) {
141
+ this.t = a
142
+ };
143
+ k.prototype.format = function(a) {
144
+ return this.g.L(a)
145
+ };
146
+ k.prototype.A = function(a) {
147
+ return this.g.w(a)
148
+ };
149
+ k.prototype.p.prototype = k.prototype;
150
+ c.Link = k
151
+ })(window.jQuery || window.Zepto);
152
+ /*
153
+
154
+ $.fn.noUiSlider - WTFPL - refreshless.com/nouislider/ */
155
+ (function(c) {
156
+ function m(e) {
157
+ return "number" === typeof e && !isNaN(e) && isFinite(e)
158
+ }
159
+
160
+ function r(e) {
161
+ return c.isArray(e) ? e : [e]
162
+ }
163
+
164
+ function k(e, b) {
165
+ e.addClass(b);
166
+ setTimeout(function() {
167
+ e.removeClass(b)
168
+ }, 300)
169
+ }
170
+
171
+ function u(e, b) {
172
+ return 100 * b / (e[1] - e[0])
173
+ }
174
+
175
+ function A(e, b) {
176
+ if (b >= e.d.slice(-1)[0]) return 100;
177
+ for (var a = 1, c, f, d; b >= e.d[a];) a++;
178
+ c = e.d[a - 1];
179
+ f = e.d[a];
180
+ d = e.c[a - 1];
181
+ c = [c, f];
182
+ return d + u(c, 0 > c[0] ? b + Math.abs(c[0]) : b - c[0]) / (100 / (e.c[a] - d))
183
+ }
184
+
185
+ function a(e, b) {
186
+ if (100 <= b) return e.d.slice(-1)[0];
187
+ for (var a = 1, c, f, d; b >= e.c[a];) a++;
188
+ c =
189
+ e.d[a - 1];
190
+ f = e.d[a];
191
+ d = e.c[a - 1];
192
+ c = [c, f];
193
+ return 100 / (e.c[a] - d) * (b - d) * (c[1] - c[0]) / 100 + c[0]
194
+ }
195
+
196
+ function h(a, b) {
197
+ for (var c = 1, g;
198
+ (a.dir ? 100 - b : b) >= a.c[c];) c++;
199
+ if (a.m) return g = a.c[c - 1], c = a.c[c], b - g > (c - g) / 2 ? c : g;
200
+ a.h[c - 1] ? (g = a.h[c - 1], c = a.c[c - 1] + Math.round((b - a.c[c - 1]) / g) * g) : c = b;
201
+ return c
202
+ }
203
+
204
+ function d(a, b) {
205
+ if (!m(b)) throw Error("noUiSlider: 'step' is not numeric.");
206
+ a.h[0] = b
207
+ }
208
+
209
+ function n(a, b) {
210
+ if ("object" !== typeof b || c.isArray(b)) throw Error("noUiSlider: 'range' is not an object.");
211
+ if (void 0 === b.min || void 0 === b.max) throw Error("noUiSlider: Missing 'min' or 'max' in 'range'.");
212
+ c.each(b, function(b, g) {
213
+ var d;
214
+ "number" === typeof g && (g = [g]);
215
+ if (!c.isArray(g)) throw Error("noUiSlider: 'range' contains invalid value.");
216
+ d = "min" === b ? 0 : "max" === b ? 100 : parseFloat(b);
217
+ if (!m(d) || !m(g[0])) throw Error("noUiSlider: 'range' value isn't numeric.");
218
+ a.c.push(d);
219
+ a.d.push(g[0]);
220
+ d ? a.h.push(isNaN(g[1]) ? !1 : g[1]) : isNaN(g[1]) || (a.h[0] = g[1])
221
+ });
222
+ c.each(a.h, function(b, c) {
223
+ if (!c) return !0;
224
+ a.h[b] = u([a.d[b], a.d[b + 1]], c) / (100 / (a.c[b + 1] - a.c[b]))
225
+ })
226
+ }
227
+
228
+ function E(a, b) {
229
+ "number" === typeof b && (b = [b]);
230
+ if (!c.isArray(b) || !b.length ||
231
+ 2 < b.length) throw Error("noUiSlider: 'start' option is incorrect.");
232
+ a.b = b.length;
233
+ a.start = b
234
+ }
235
+
236
+ function I(a, b) {
237
+ a.m = b;
238
+ if ("boolean" !== typeof b) throw Error("noUiSlider: 'snap' option must be a boolean.");
239
+ }
240
+
241
+ function J(a, b) {
242
+ if ("lower" === b && 1 === a.b) a.i = 1;
243
+ else if ("upper" === b && 1 === a.b) a.i = 2;
244
+ else if (!0 === b && 2 === a.b) a.i = 3;
245
+ else if (!1 === b) a.i = 0;
246
+ else throw Error("noUiSlider: 'connect' option doesn't match handle count.");
247
+ }
248
+
249
+ function D(a, b) {
250
+ switch (b) {
251
+ case "horizontal":
252
+ a.k = 0;
253
+ break;
254
+ case "vertical":
255
+ a.k = 1;
256
+ break;
257
+ default:
258
+ throw Error("noUiSlider: 'orientation' option is invalid.");
259
+ }
260
+ }
261
+
262
+ function K(a, b) {
263
+ if (2 < a.c.length) throw Error("noUiSlider: 'margin' option is only supported on linear sliders.");
264
+ a.margin = u(a.d, b);
265
+ if (!m(b)) throw Error("noUiSlider: 'margin' option must be numeric.");
266
+ }
267
+
268
+ function L(a, b) {
269
+ switch (b) {
270
+ case "ltr":
271
+ a.dir = 0;
272
+ break;
273
+ case "rtl":
274
+ a.dir = 1;
275
+ a.i = [0, 2, 1, 3][a.i];
276
+ break;
277
+ default:
278
+ throw Error("noUiSlider: 'direction' option was not recognized.");
279
+ }
280
+ }
281
+
282
+ function M(a, b) {
283
+ if ("string" !== typeof b) throw Error("noUiSlider: 'behaviour' must be a string containing options.");
284
+ var c = 0 <= b.indexOf("snap");
285
+ a.n = {
286
+ s: 0 <= b.indexOf("tap") || c,
287
+ extend: 0 <= b.indexOf("extend"),
288
+ v: 0 <= b.indexOf("drag"),
289
+ fixed: 0 <= b.indexOf("fixed"),
290
+ m: c
291
+ }
292
+ }
293
+
294
+ function N(a, b, d) {
295
+ a.o = [b.lower, b.upper];
296
+ a.g = b.format;
297
+ c.each(a.o, function(a, e) {
298
+ if (!c.isArray(e)) throw Error("noUiSlider: 'serialization." + (a ? "upper" : "lower") + "' must be an array.");
299
+ c.each(e, function() {
300
+ if (!(this instanceof c.Link)) throw Error("noUiSlider: 'serialization." + (a ? "upper" : "lower") + "' can only contain Link instances.");
301
+ this.I(a);
302
+ this.J(d);
303
+ this.q(b.format)
304
+ })
305
+ });
306
+ a.dir && 1 < a.b && a.o.reverse()
307
+ }
308
+
309
+ function O(a, b) {
310
+ var f = {
311
+ c: [],
312
+ d: [],
313
+ h: [!1],
314
+ margin: 0
315
+ },
316
+ g;
317
+ g = {
318
+ step: {
319
+ e: !1,
320
+ f: d
321
+ },
322
+ start: {
323
+ e: !0,
324
+ f: E
325
+ },
326
+ connect: {
327
+ e: !0,
328
+ f: J
329
+ },
330
+ direction: {
331
+ e: !0,
332
+ f: L
333
+ },
334
+ range: {
335
+ e: !0,
336
+ f: n
337
+ },
338
+ snap: {
339
+ e: !1,
340
+ f: I
341
+ },
342
+ orientation: {
343
+ e: !1,
344
+ f: D
345
+ },
346
+ margin: {
347
+ e: !1,
348
+ f: K
349
+ },
350
+ behaviour: {
351
+ e: !0,
352
+ f: M
353
+ },
354
+ serialization: {
355
+ e: !0,
356
+ f: N
357
+ }
358
+ };
359
+ a = c.extend({
360
+ connect: !1,
361
+ direction: "ltr",
362
+ behaviour: "tap",
363
+ orientation: "horizontal"
364
+ }, a);
365
+ a.serialization = c.extend({
366
+ lower: [],
367
+ upper: [],
368
+ format: {}
369
+ }, a.serialization);
370
+ c.each(g, function(c, d) {
371
+ if (void 0 === a[c]) {
372
+ if (d.e) throw Error("noUiSlider: '" + c + "' is required.");
373
+ return !0
374
+ }
375
+ d.f(f, a[c], b)
376
+ });
377
+ f.style = f.k ? "top" : "left";
378
+ return f
379
+ }
380
+
381
+ function P(a, b) {
382
+ var d = c("<div><div/></div>").addClass(f[2]),
383
+ g = ["-lower", "-upper"];
384
+ a.dir && g.reverse();
385
+ d.children().addClass(f[3] + " " + f[3] + g[b]);
386
+ return d
387
+ }
388
+
389
+ function Q(a, b) {
390
+ b.j && (b = new c.Link({
391
+ target: c(b.j).clone().appendTo(a),
392
+ method: b.method,
393
+ format: b.g
394
+ }, !0));
395
+ return b
396
+ }
397
+
398
+ function R(a, b) {
399
+ var d, f = [];
400
+ for (d = 0; d < a.b; d++) {
401
+ var k = f,
402
+ h = d,
403
+ m = a.o[d],
404
+ n = b[d].children(),
405
+ r = a.g,
406
+ s = void 0,
407
+ v = [],
408
+ s = new c.Link({}, !0);
409
+ s.q(r);
410
+ v.push(s);
411
+ for (s = 0; s < m.length; s++) v.push(Q(n, m[s]));
412
+ k[h] = v
413
+ }
414
+ return f
415
+ }
416
+
417
+ function S(a, b, c) {
418
+ switch (a) {
419
+ case 1:
420
+ b.addClass(f[7]);
421
+ c[0].addClass(f[6]);
422
+ break;
423
+ case 3:
424
+ c[1].addClass(f[6]);
425
+ case 2:
426
+ c[0].addClass(f[7]);
427
+ case 0:
428
+ b.addClass(f[6])
429
+ }
430
+ }
431
+
432
+ function T(a, b) {
433
+ var c, d = [];
434
+ for (c = 0; c < a.b; c++) d.push(P(a, c).appendTo(b));
435
+ return d
436
+ }
437
+
438
+ function U(a, b) {
439
+ b.addClass([f[0], f[8 + a.dir], f[4 + a.k]].join(" "));
440
+ return c("<div/>").appendTo(b).addClass(f[1])
441
+ }
442
+
443
+ function V(d, b, m) {
444
+ function g() {
445
+ return t[["width", "height"][b.k]]()
446
+ }
447
+
448
+ function n(a) {
449
+ var b, c = [q.val()];
450
+ for (b = 0; b < a.length; b++) q.trigger(a[b],
451
+ c)
452
+ }
453
+
454
+ function u(d, p, e) {
455
+ var g = d[0] !== l[0][0] ? 1 : 0,
456
+ H = x[0] + b.margin,
457
+ k = x[1] - b.margin;
458
+ e && 1 < l.length && (p = g ? Math.max(p, H) : Math.min(p, k));
459
+ 100 > p && (p = h(b, p));
460
+ p = Math.max(Math.min(parseFloat(p.toFixed(7)), 100), 0);
461
+ if (p === x[g]) return 1 === l.length ? !1 : p === H || p === k ? 0 : !1;
462
+ d.css(b.style, p + "%");
463
+ d.is(":first-child") && d.toggleClass(f[17], 50 < p);
464
+ x[g] = p;
465
+ b.dir && (p = 100 - p);
466
+ c(y[g]).each(function() {
467
+ this.write(a(b, p), d.children(), q)
468
+ });
469
+ return !0
470
+ }
471
+
472
+ function B(a, b, c) {
473
+ c || k(q, f[14]);
474
+ u(a, b, !1);
475
+ n(["slide", "set", "change"])
476
+ }
477
+
478
+ function w(a, c, d, e) {
479
+ a =
480
+ a.replace(/\s/g, ".nui ") + ".nui";
481
+ c.on(a, function(a) {
482
+ var c = q.attr("disabled");
483
+ if (q.hasClass(f[14]) || void 0 !== c && null !== c) return !1;
484
+ a.preventDefault();
485
+ var c = 0 === a.type.indexOf("touch"),
486
+ p = 0 === a.type.indexOf("mouse"),
487
+ F = 0 === a.type.indexOf("pointer"),
488
+ g, k, l = a;
489
+ 0 === a.type.indexOf("MSPointer") && (F = !0);
490
+ a.originalEvent && (a = a.originalEvent);
491
+ c && (g = a.changedTouches[0].pageX, k = a.changedTouches[0].pageY);
492
+ if (p || F) F || void 0 !== window.pageXOffset || (window.pageXOffset = document.documentElement.scrollLeft, window.pageYOffset =
493
+ document.documentElement.scrollTop), g = a.clientX + window.pageXOffset, k = a.clientY + window.pageYOffset;
494
+ l.C = [g, k];
495
+ l.cursor = p;
496
+ a = l;
497
+ a.l = a.C[b.k];
498
+ d(a, e)
499
+ })
500
+ }
501
+
502
+ function C(a, c) {
503
+ var b = c.b || l,
504
+ d, e = !1,
505
+ e = 100 * (a.l - c.start) / g(),
506
+ f = b[0][0] !== l[0][0] ? 1 : 0;
507
+ var k = c.D;
508
+ d = e + k[0];
509
+ e += k[1];
510
+ 1 < b.length ? (0 > d && (e += Math.abs(d)), 100 < e && (d -= e - 100), d = [Math.max(Math.min(d, 100), 0), Math.max(Math.min(e, 100), 0)]) : d = [d, e];
511
+ e = u(b[0], d[f], 1 === b.length);
512
+ 1 < b.length && (e = u(b[1], d[f ? 0 : 1], !1) || e);
513
+ e && n(["slide"])
514
+ }
515
+
516
+ function s(a) {
517
+ c("." + f[15]).removeClass(f[15]);
518
+ a.cursor && c("body").css("cursor", "").off(".nui");
519
+ G.off(".nui");
520
+ q.removeClass(f[12]);
521
+ n(["set", "change"])
522
+ }
523
+
524
+ function v(a, b) {
525
+ 1 === b.b.length && b.b[0].children().addClass(f[15]);
526
+ a.stopPropagation();
527
+ w(z.move, G, C, {
528
+ start: a.l,
529
+ b: b.b,
530
+ D: [x[0], x[l.length - 1]]
531
+ });
532
+ w(z.end, G, s, null);
533
+ a.cursor && (c("body").css("cursor", c(a.target).css("cursor")), 1 < l.length && q.addClass(f[12]), c("body").on("selectstart.nui", !1))
534
+ }
535
+
536
+ function D(a) {
537
+ var d = a.l,
538
+ e = 0;
539
+ a.stopPropagation();
540
+ c.each(l, function() {
541
+ e += this.offset()[b.style]
542
+ });
543
+ e = d < e / 2 || 1 === l.length ?
544
+ 0 : 1;
545
+ d -= t.offset()[b.style];
546
+ d = 100 * d / g();
547
+ B(l[e], d, b.n.m);
548
+ b.n.m && v(a, {
549
+ b: [l[e]]
550
+ })
551
+ }
552
+
553
+ function E(a) {
554
+ var c = (a = a.l < t.offset()[b.style]) ? 0 : 100;
555
+ a = a ? 0 : l.length - 1;
556
+ B(l[a], c, !1)
557
+ }
558
+ var q = c(d),
559
+ x = [-1, -1],
560
+ t, y, l;
561
+ if (q.hasClass(f[0])) throw Error("Slider was already initialized.");
562
+ t = U(b, q);
563
+ l = T(b, t);
564
+ y = R(b, l);
565
+ S(b.i, q, l);
566
+ (function(a) {
567
+ var b;
568
+ if (!a.fixed)
569
+ for (b = 0; b < l.length; b++) w(z.start, l[b].children(), v, {
570
+ b: [l[b]]
571
+ });
572
+ a.s && w(z.start, t, D, {
573
+ b: l
574
+ });
575
+ a.extend && (q.addClass(f[16]), a.s && w(z.start, q, E, {
576
+ b: l
577
+ }));
578
+ a.v && (b = t.find("." + f[7]).addClass(f[10]),
579
+ a.fixed && (b = b.add(t.children().not(b).children())), w(z.start, b, v, {
580
+ b: l
581
+ }))
582
+ })(b.n);
583
+ d.vSet = function() {
584
+ var a = Array.prototype.slice.call(arguments, 0),
585
+ d, e, g, h, m, s, t = r(a[0]);
586
+ "object" === typeof a[1] ? (d = a[1].set, e = a[1].link, g = a[1].update, h = a[1].animate) : !0 === a[1] && (d = !0);
587
+ b.dir && 1 < b.b && t.reverse();
588
+ h && k(q, f[14]);
589
+ a = 1 < l.length ? 3 : 1;
590
+ 1 === t.length && (a = 1);
591
+ for (m = 0; m < a; m++) h = e || y[m % 2][0], h = h.A(t[m % 2]), !1 !== h && (h = A(b, h), b.dir && (h = 100 - h), !0 !== u(l[m % 2], h, !0) && c(y[m % 2]).each(function(a) {
592
+ if (!a) return s = this.u, !0;
593
+ this.write(s,
594
+ l[m % 2].children(), q, g)
595
+ }));
596
+ !0 === d && n(["set"]);
597
+ return this
598
+ };
599
+ d.vGet = function() {
600
+ var a, c = [];
601
+ for (a = 0; a < b.b; a++) c[a] = y[a][0].F;
602
+ return 1 === c.length ? c[0] : b.dir ? c.reverse() : c
603
+ };
604
+ d.destroy = function() {
605
+ c.each(y, function() {
606
+ c.each(this, function() {
607
+ this.target && this.target.off(".nui")
608
+ })
609
+ });
610
+ c(this).off(".nui").removeClass(f.join(" ")).empty();
611
+ return m
612
+ };
613
+ q.val(b.start)
614
+ }
615
+
616
+ function W(a) {
617
+ if (!this.length) throw Error("noUiSlider: Can't initialize slider on empty selection.");
618
+ var b = O(a, this);
619
+ return this.each(function() {
620
+ V(this,
621
+ b, a)
622
+ })
623
+ }
624
+
625
+ function X(a) {
626
+ return this.each(function() {
627
+ var b = c(this).val(),
628
+ d = this.destroy(),
629
+ f = c.extend({}, d, a);
630
+ c(this).noUiSlider(f);
631
+ d.start === f.start && c(this).val(b)
632
+ })
633
+ }
634
+
635
+ function B() {
636
+ return this[0][arguments.length ? "vSet" : "vGet"].apply(this[0], arguments)
637
+ }
638
+ var G = c(document),
639
+ C = c.fn.val,
640
+ z = window.navigator.pointerEnabled ? {
641
+ start: "pointerdown",
642
+ move: "pointermove",
643
+ end: "pointerup"
644
+ } : window.navigator.msPointerEnabled ? {
645
+ start: "MSPointerDown",
646
+ move: "MSPointerMove",
647
+ end: "MSPointerUp"
648
+ } : {
649
+ start: "mousedown touchstart",
650
+ move: "mousemove touchmove",
651
+ end: "mouseup touchend"
652
+ },
653
+ f = "noUi-target noUi-base noUi-origin noUi-handle noUi-horizontal noUi-vertical noUi-background noUi-connect noUi-ltr noUi-rtl noUi-dragable noUi-state-drag noUi-state-tap noUi-active noUi-extended noUi-stacking".split(" ");
654
+ c.fn.val = function() {
655
+ var a = arguments,
656
+ b = c(this[0]);
657
+ return arguments.length ? this.each(function() {
658
+ (c(this).hasClass(f[0]) ? B : C).apply(c(this), a)
659
+ }) : (b.hasClass(f[0]) ? B : C).call(b)
660
+ };
661
+ c.noUiSlider = {
662
+ Link: c.Link
663
+ };
664
+ c.fn.noUiSlider = function(a, b) {
665
+ return (b ? X : W).call(this,
666
+ a)
667
+ }
668
+ })(window.jQuery || window.Zepto);