notify-custom.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. /** Notify.js - v0.3.1 - 2014/06/29
  2. * http://notifyjs.com/
  3. * Copyright (c) 2014 Jaime Pillora - MIT
  4. */
  5. (function(window,document,$,undefined) {
  6. 'use strict';
  7. var Notification, addStyle, blankFieldName, coreStyle, createElem, defaults, encode, find, findFields, getAnchorElement, getStyle, globalAnchors, hAligns, incr, inherit, insertCSS, mainPositions, opposites, parsePosition, pluginClassName, pluginName, pluginOptions, positions, realign, stylePrefixes, styles, vAligns,
  8. __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
  9. pluginName = 'notify';
  10. pluginClassName = pluginName + 'js';
  11. blankFieldName = pluginName + "!blank";
  12. positions = {
  13. t: 'top',
  14. m: 'middle',
  15. b: 'bottom',
  16. l: 'left',
  17. c: 'center',
  18. r: 'right'
  19. };
  20. hAligns = ['l', 'c', 'r'];
  21. vAligns = ['t', 'm', 'b'];
  22. mainPositions = ['t', 'b', 'l', 'r'];
  23. opposites = {
  24. t: 'b',
  25. m: null,
  26. b: 't',
  27. l: 'r',
  28. c: null,
  29. r: 'l'
  30. };
  31. parsePosition = function(str) {
  32. var pos;
  33. pos = [];
  34. $.each(str.split(/\W+/), function(i, word) {
  35. var w;
  36. w = word.toLowerCase().charAt(0);
  37. if (positions[w]) {
  38. return pos.push(w);
  39. }
  40. });
  41. return pos;
  42. };
  43. styles = {};
  44. coreStyle = {
  45. name: 'core',
  46. html: "<div class=\"" + pluginClassName + "-wrapper\">\n <div class=\"" + pluginClassName + "-arrow\"></div>\n <div class=\"" + pluginClassName + "-container\"></div>\n</div>",
  47. css: "." + pluginClassName + "-corner {\n position: fixed;\n margin: 5px;\n z-index: 1050;\n}\n\n." + pluginClassName + "-corner ." + pluginClassName + "-wrapper,\n." + pluginClassName + "-corner ." + pluginClassName + "-container {\n position: relative;\n display: block;\n height: inherit;\n width: inherit;\n margin: 3px;\n}\n\n." + pluginClassName + "-wrapper {\n z-index: 1;\n position: absolute;\n display: inline-block;\n height: 0;\n width: 0;\n}\n\n." + pluginClassName + "-container {\n display: none;\n z-index: 1;\n position: absolute;\n}\n\n." + pluginClassName + "-hidable {\n cursor: pointer;\n}\n\n[data-notify-text],[data-notify-html] {\n position: relative;\n}\n\n." + pluginClassName + "-arrow {\n position: absolute;\n z-index: 2;\n width: 0;\n height: 0;\n}"
  48. };
  49. stylePrefixes = {
  50. "border-radius": ["-webkit-", "-moz-"]
  51. };
  52. getStyle = function(name) {
  53. return styles[name];
  54. };
  55. addStyle = function(name, def) {
  56. var cssText, elem, fields, _ref;
  57. if (!name) {
  58. throw "Missing Style name";
  59. }
  60. if (!def) {
  61. throw "Missing Style definition";
  62. }
  63. if (!def.html) {
  64. throw "Missing Style HTML";
  65. }
  66. if ((_ref = styles[name]) != null ? _ref.cssElem : void 0) {
  67. if (window.console) {
  68. console.warn("" + pluginName + ": overwriting style '" + name + "'");
  69. }
  70. styles[name].cssElem.remove();
  71. }
  72. def.name = name;
  73. styles[name] = def;
  74. cssText = "";
  75. if (def.classes) {
  76. $.each(def.classes, function(className, props) {
  77. cssText += "." + pluginClassName + "-" + def.name + "-" + className + " {\n";
  78. $.each(props, function(name, val) {
  79. if (stylePrefixes[name]) {
  80. $.each(stylePrefixes[name], function(i, prefix) {
  81. return cssText += " " + prefix + name + ": " + val + ";\n";
  82. });
  83. }
  84. return cssText += " " + name + ": " + val + ";\n";
  85. });
  86. return cssText += "}\n";
  87. });
  88. }
  89. if (def.css) {
  90. cssText += "/* styles for " + def.name + " */\n" + def.css;
  91. }
  92. if (cssText) {
  93. def.cssElem = insertCSS(cssText);
  94. def.cssElem.attr('id', "notify-" + def.name);
  95. }
  96. fields = {};
  97. elem = $(def.html);
  98. findFields('html', elem, fields);
  99. findFields('text', elem, fields);
  100. return def.fields = fields;
  101. };
  102. insertCSS = function(cssText) {
  103. var elem;
  104. elem = createElem("style");
  105. elem.attr('type', 'text/css');
  106. $("head").append(elem);
  107. try {
  108. elem.html(cssText);
  109. } catch (e) {
  110. elem[0].styleSheet.cssText = cssText;
  111. }
  112. return elem;
  113. };
  114. findFields = function(type, elem, fields) {
  115. var attr;
  116. if (type !== 'html') {
  117. type = 'text';
  118. }
  119. attr = "data-notify-" + type;
  120. return find(elem, "[" + attr + "]").each(function() {
  121. var name;
  122. name = $(this).attr(attr);
  123. if (!name) {
  124. name = blankFieldName;
  125. }
  126. return fields[name] = type;
  127. });
  128. };
  129. find = function(elem, selector) {
  130. if (elem.is(selector)) {
  131. return elem;
  132. } else {
  133. return elem.find(selector);
  134. }
  135. };
  136. pluginOptions = {
  137. clickToHide: true,
  138. autoHide: true,
  139. autoHideDelay: 5000,
  140. arrowShow: true,
  141. arrowSize: 5,
  142. breakNewLines: true,
  143. elementPosition: 'bottom',
  144. globalPosition: 'top right',
  145. style: 'bootstrap',
  146. className: 'error',
  147. showAnimation: 'slideDown',
  148. showDuration: 400,
  149. hideAnimation: 'slideUp',
  150. hideDuration: 200,
  151. gap: 5,
  152. callback : function(msg){},
  153. };
  154. inherit = function(a, b) {
  155. var F;
  156. F = function() {};
  157. F.prototype = a;
  158. return $.extend(true, new F(), b);
  159. };
  160. defaults = function(opts) {
  161. return $.extend(pluginOptions, opts);
  162. };
  163. createElem = function(tag) {
  164. return $("<" + tag + "></" + tag + ">");
  165. };
  166. globalAnchors = {};
  167. getAnchorElement = function(element) {
  168. var radios;
  169. if (element.is('[type=radio]')) {
  170. radios = element.parents('form:first').find('[type=radio]').filter(function(i, e) {
  171. return $(e).attr('name') === element.attr('name');
  172. });
  173. element = radios.first();
  174. }
  175. return element;
  176. };
  177. incr = function(obj, pos, val) {
  178. var opp, temp;
  179. if (typeof val === 'string') {
  180. val = parseInt(val, 10);
  181. } else if (typeof val !== 'number') {
  182. return;
  183. }
  184. if (isNaN(val)) {
  185. return;
  186. }
  187. opp = positions[opposites[pos.charAt(0)]];
  188. temp = pos;
  189. if (obj[opp] !== undefined) {
  190. pos = positions[opp.charAt(0)];
  191. val = -val;
  192. }
  193. if (obj[pos] === undefined) {
  194. obj[pos] = val;
  195. } else {
  196. obj[pos] += val;
  197. }
  198. return null;
  199. };
  200. realign = function(alignment, inner, outer) {
  201. if (alignment === 'l' || alignment === 't') {
  202. return 0;
  203. } else if (alignment === 'c' || alignment === 'm') {
  204. return outer / 2 - inner / 2;
  205. } else if (alignment === 'r' || alignment === 'b') {
  206. return outer - inner;
  207. }
  208. throw "Invalid alignment";
  209. };
  210. encode = function(text) {
  211. encode.e = encode.e || createElem("div");
  212. return encode.e.text(text).html();
  213. };
  214. Notification = (function() {
  215. function Notification(elem, data, options) {
  216. if (typeof options === 'string') {
  217. options = {
  218. className: options
  219. };
  220. }
  221. this.options = inherit(pluginOptions, $.isPlainObject(options) ? options : {});
  222. this.loadHTML();
  223. this.wrapper = $(coreStyle.html);
  224. if (this.options.clickToHide) {
  225. this.wrapper.addClass("" + pluginClassName + "-hidable");
  226. }
  227. this.wrapper.data(pluginClassName, this);
  228. this.arrow = this.wrapper.find("." + pluginClassName + "-arrow");
  229. this.container = this.wrapper.find("." + pluginClassName + "-container");
  230. this.container.append(this.userContainer);
  231. if (elem && elem.length) {
  232. this.elementType = elem.attr('type');
  233. this.originalElement = elem;
  234. this.elem = getAnchorElement(elem);
  235. this.elem.data(pluginClassName, this);
  236. this.elem.before(this.wrapper);
  237. }
  238. this.container.hide();
  239. this.run(data);
  240. }
  241. Notification.prototype.loadHTML = function() {
  242. var style;
  243. style = this.getStyle();
  244. this.userContainer = $(style.html);
  245. return this.userFields = style.fields;
  246. };
  247. Notification.prototype.show = function(show, userCallback) {
  248. var args, callback, elems, fn, hidden,
  249. _this = this;
  250. callback = function() {
  251. if (!show && !_this.elem) {
  252. _this.destroy();
  253. }
  254. if (userCallback) {
  255. return userCallback();
  256. }
  257. };
  258. hidden = this.container.parent().parents(':hidden').length > 0;
  259. elems = this.container.add(this.arrow);
  260. args = [];
  261. if (hidden && show) {
  262. fn = 'show';
  263. } else if (hidden && !show) {
  264. fn = 'hide';
  265. } else if (!hidden && show) {
  266. fn = this.options.showAnimation;
  267. args.push(this.options.showDuration);
  268. } else if (!hidden && !show) {
  269. fn = this.options.hideAnimation;
  270. args.push(this.options.hideDuration);
  271. } else {
  272. return callback();
  273. }
  274. args.push(callback);
  275. //添加回调方法,供外部调用
  276. if(fn == this.options.hideAnimation){
  277. setTimeout(this.options.callback, this.options.hideDuration);
  278. }
  279. return elems[fn].apply(elems, args);
  280. };
  281. Notification.prototype.setGlobalPosition = function() {
  282. var align, anchor, css, key, main, pAlign, pMain, _ref;
  283. _ref = this.getPosition(), pMain = _ref[0], pAlign = _ref[1];
  284. main = positions[pMain];
  285. align = positions[pAlign];
  286. key = pMain + "|" + pAlign;
  287. anchor = globalAnchors[key];
  288. if (!anchor) {
  289. anchor = globalAnchors[key] = createElem("div");
  290. css = {};
  291. css[main] = 0;
  292. if (align === 'middle') {
  293. css.top = '45%';
  294. } else if (align === 'center') {
  295. css.left = '45%';
  296. } else {
  297. css[align] = 0;
  298. }
  299. anchor.css(css).addClass("" + pluginClassName + "-corner");
  300. $("body").append(anchor);
  301. }
  302. return anchor.prepend(this.wrapper);
  303. };
  304. Notification.prototype.setElementPosition = function() {
  305. var arrowColor, arrowCss, arrowSize, color, contH, contW, css, elemH, elemIH, elemIW, elemPos, elemW, gap, mainFull, margin, opp, oppFull, pAlign, pArrow, pMain, pos, posFull, position, wrapPos, _i, _j, _len, _len1, _ref;
  306. position = this.getPosition();
  307. pMain = position[0], pAlign = position[1], pArrow = position[2];
  308. elemPos = this.elem.position();
  309. elemH = this.elem.outerHeight();
  310. elemW = this.elem.outerWidth();
  311. elemIH = this.elem.innerHeight();
  312. elemIW = this.elem.innerWidth();
  313. wrapPos = this.wrapper.position();
  314. contH = this.container.height();
  315. contW = this.container.width();
  316. mainFull = positions[pMain];
  317. opp = opposites[pMain];
  318. oppFull = positions[opp];
  319. css = {};
  320. css[oppFull] = pMain === 'b' ? elemH : pMain === 'r' ? elemW : 0;
  321. incr(css, 'top', elemPos.top - wrapPos.top);
  322. incr(css, 'left', elemPos.left - wrapPos.left);
  323. _ref = ['top', 'left'];
  324. for (_i = 0, _len = _ref.length; _i < _len; _i++) {
  325. pos = _ref[_i];
  326. margin = parseInt(this.elem.css("margin-" + pos), 10);
  327. if (margin) {
  328. incr(css, pos, margin);
  329. }
  330. }
  331. gap = Math.max(0, this.options.gap - (this.options.arrowShow ? arrowSize : 0));
  332. incr(css, oppFull, gap);
  333. if (!this.options.arrowShow) {
  334. this.arrow.hide();
  335. } else {
  336. arrowSize = this.options.arrowSize;
  337. arrowCss = $.extend({}, css);
  338. arrowColor = this.userContainer.css("border-color") || this.userContainer.css("background-color") || 'white';
  339. for (_j = 0, _len1 = mainPositions.length; _j < _len1; _j++) {
  340. pos = mainPositions[_j];
  341. posFull = positions[pos];
  342. if (pos === opp) {
  343. continue;
  344. }
  345. color = posFull === mainFull ? arrowColor : 'transparent';
  346. arrowCss["border-" + posFull] = "" + arrowSize + "px solid " + color;
  347. }
  348. incr(css, positions[opp], arrowSize);
  349. if (__indexOf.call(mainPositions, pAlign) >= 0) {
  350. incr(arrowCss, positions[pAlign], arrowSize * 2);
  351. }
  352. }
  353. if (__indexOf.call(vAligns, pMain) >= 0) {
  354. incr(css, 'left', realign(pAlign, contW, elemW));
  355. if (arrowCss) {
  356. incr(arrowCss, 'left', realign(pAlign, arrowSize, elemIW));
  357. }
  358. } else if (__indexOf.call(hAligns, pMain) >= 0) {
  359. incr(css, 'top', realign(pAlign, contH, elemH));
  360. if (arrowCss) {
  361. incr(arrowCss, 'top', realign(pAlign, arrowSize, elemIH));
  362. }
  363. }
  364. if (this.container.is(":visible")) {
  365. css.display = 'block';
  366. }
  367. this.container.removeAttr('style').css(css);
  368. if (arrowCss) {
  369. return this.arrow.removeAttr('style').css(arrowCss);
  370. }
  371. };
  372. Notification.prototype.getPosition = function() {
  373. var pos, text, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
  374. text = this.options.position || (this.elem ? this.options.elementPosition : this.options.globalPosition);
  375. pos = parsePosition(text);
  376. if (pos.length === 0) {
  377. pos[0] = 'b';
  378. }
  379. if (_ref = pos[0], __indexOf.call(mainPositions, _ref) < 0) {
  380. throw "Must be one of [" + mainPositions + "]";
  381. }
  382. if (pos.length === 1 || ((_ref1 = pos[0], __indexOf.call(vAligns, _ref1) >= 0) && (_ref2 = pos[1], __indexOf.call(hAligns, _ref2) < 0)) || ((_ref3 = pos[0], __indexOf.call(hAligns, _ref3) >= 0) && (_ref4 = pos[1], __indexOf.call(vAligns, _ref4) < 0))) {
  383. pos[1] = (_ref5 = pos[0], __indexOf.call(hAligns, _ref5) >= 0) ? 'm' : 'l';
  384. }
  385. if (pos.length === 2) {
  386. pos[2] = pos[1];
  387. }
  388. return pos;
  389. };
  390. Notification.prototype.getStyle = function(name) {
  391. var style;
  392. if (!name) {
  393. name = this.options.style;
  394. }
  395. if (!name) {
  396. name = 'default';
  397. }
  398. style = styles[name];
  399. if (!style) {
  400. throw "Missing style: " + name;
  401. }
  402. return style;
  403. };
  404. Notification.prototype.updateClasses = function() {
  405. var classes, style;
  406. classes = ['base'];
  407. if ($.isArray(this.options.className)) {
  408. classes = classes.concat(this.options.className);
  409. } else if (this.options.className) {
  410. classes.push(this.options.className);
  411. }
  412. style = this.getStyle();
  413. classes = $.map(classes, function(n) {
  414. return "" + pluginClassName + "-" + style.name + "-" + n;
  415. }).join(' ');
  416. return this.userContainer.attr('class', classes);
  417. };
  418. Notification.prototype.run = function(data, options) {
  419. var d, datas, name, type, value,
  420. _this = this;
  421. if ($.isPlainObject(options)) {
  422. $.extend(this.options, options);
  423. } else if ($.type(options) === 'string') {
  424. this.options.className = options;
  425. }
  426. if (this.container && !data) {
  427. this.show(false);
  428. return;
  429. } else if (!this.container && !data) {
  430. return;
  431. }
  432. datas = {};
  433. if ($.isPlainObject(data)) {
  434. datas = data;
  435. } else {
  436. datas[blankFieldName] = data;
  437. }
  438. for (name in datas) {
  439. d = datas[name];
  440. type = this.userFields[name];
  441. if (!type) {
  442. continue;
  443. }
  444. if (type === 'text') {
  445. d = encode(d);
  446. if (this.options.breakNewLines) {
  447. d = d.replace(/\n/g, '<br/>');
  448. }
  449. }
  450. value = name === blankFieldName ? '' : '=' + name;
  451. find(this.userContainer, "[data-notify-" + type + value + "]").html(d);
  452. }
  453. this.updateClasses();
  454. if (this.elem) {
  455. this.setElementPosition();
  456. } else {
  457. this.setGlobalPosition();
  458. }
  459. this.show(true);
  460. if (this.options.autoHide) {
  461. clearTimeout(this.autohideTimer);
  462. return this.autohideTimer = setTimeout(function() {
  463. return _this.show(false);
  464. }, this.options.autoHideDelay);
  465. }
  466. };
  467. Notification.prototype.destroy = function() {
  468. return this.wrapper.remove();
  469. };
  470. return Notification;
  471. })();
  472. $[pluginName] = function(elem, data, options) {
  473. if ((elem && elem.nodeName) || elem.jquery) {
  474. $(elem)[pluginName](data, options);
  475. } else {
  476. if(typeof options == 'object'){
  477. options.className = data;
  478. }else{
  479. options = data;
  480. }
  481. data = elem;
  482. new Notification(null, data, options);
  483. }
  484. return elem;
  485. };
  486. $.fn[pluginName] = function(data, options) {
  487. $(this).each(function() {
  488. var inst;
  489. inst = getAnchorElement($(this)).data(pluginClassName);
  490. if (inst) {
  491. return inst.run(data, options);
  492. } else {
  493. return new Notification($(this), data, options);
  494. }
  495. });
  496. return this;
  497. };
  498. $.extend($[pluginName], {
  499. defaults: defaults,
  500. addStyle: addStyle,
  501. pluginOptions: pluginOptions,
  502. getStyle: getStyle,
  503. insertCSS: insertCSS
  504. });
  505. $(function() {
  506. insertCSS(coreStyle.css).attr('id', 'core-notify');
  507. $(document).on('click', "." + pluginClassName + "-hidable", function(e) {
  508. return $(this).trigger('notify-hide');
  509. });
  510. return $(document).on('notify-hide', "." + pluginClassName + "-wrapper", function(e) {
  511. var _ref;
  512. return (_ref = $(this).data(pluginClassName)) != null ? _ref.show(false) : void 0;
  513. });
  514. });
  515. }(window,document,jQuery));
  516. $.notify.defaults({
  517. style: "bootstrap"
  518. });
  519. $.notify.addStyle("bootstrap", {
  520. html: "<div>\n<span data-notify-text></span>\n</div>",
  521. classes: {
  522. base: {
  523. "font-weight": "bold",
  524. "padding": "8px 15px 8px 14px",
  525. "text-shadow": "0 1px 0 rgba(255, 255, 255, 0.5)",
  526. "background-color": "#fcf8e3",
  527. "border": "1px solid #fbeed5",
  528. "border-radius": "4px",
  529. "white-space": "nowrap",
  530. "padding-left": "25px",
  531. "background-repeat": "no-repeat",
  532. "background-position": "3px 7px"
  533. },
  534. error: {
  535. "color": "#B94A48",
  536. "background-color": "#F2DEDE",
  537. "border-color": "#EED3D7",
  538. "background-image": "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtRJREFUeNqkVc1u00AQHq+dOD+0poIQfkIjalW0SEGqRMuRnHos3DjwAH0ArlyQeANOOSMeAA5VjyBxKBQhgSpVUKKQNGloFdw4cWw2jtfMOna6JOUArDTazXi/b3dm55socPqQhFka++aHBsI8GsopRJERNFlY88FCEk9Yiwf8RhgRyaHFQpPHCDmZG5oX2ui2yilkcTT1AcDsbYC1NMAyOi7zTX2Agx7A9luAl88BauiiQ/cJaZQfIpAlngDcvZZMrl8vFPK5+XktrWlx3/ehZ5r9+t6e+WVnp1pxnNIjgBe4/6dAysQc8dsmHwPcW9C0h3fW1hans1ltwJhy0GxK7XZbUlMp5Ww2eyan6+ft/f2FAqXGK4CvQk5HueFz7D6GOZtIrK+srupdx1GRBBqNBtzc2AiMr7nPplRdKhb1q6q6zjFhrklEFOUutoQ50xcX86ZlqaZpQrfbBdu2R6/G19zX6XSgh6RX5ubyHCM8nqSID6ICrGiZjGYYxojEsiw4PDwMSL5VKsC8Yf4VRYFzMzMaxwjlJSlCyAQ9l0CW44PBADzXhe7xMdi9HtTrdYjFYkDQL0cn4Xdq2/EAE+InCnvADTf2eah4Sx9vExQjkqXT6aAERICMewd/UAp/IeYANM2joxt+q5VI+ieq2i0Wg3l6DNzHwTERPgo1ko7XBXj3vdlsT2F+UuhIhYkp7u7CarkcrFOCtR3H5JiwbAIeImjT/YQKKBtGjRFCU5IUgFRe7fF4cCNVIPMYo3VKqxwjyNAXNepuopyqnld602qVsfRpEkkz+GFL1wPj6ySXBpJtWVa5xlhpcyhBNwpZHmtX8AGgfIExo0ZpzkWVTBGiXCSEaHh62/PoR0p/vHaczxXGnj4bSo+G78lELU80h1uogBwWLf5YlsPmgDEd4M236xjm+8nm4IuE/9u+/PH2JXZfbwz4zw1WbO+SQPpXfwG/BBgAhCNZiSb/pOQAAAAASUVORK5CYII=)"
  539. },
  540. success: {
  541. "color": "#468847",
  542. "background-color": "#DFF0D8",
  543. "border-color": "#D6E9C6",
  544. "background-image": "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAutJREFUeNq0lctPE0Ecx38zu/RFS1EryqtgJFA08YCiMZIAQQ4eRG8eDGdPJiYeTIwHTfwPiAcvXIwXLwoXPaDxkWgQ6islKlJLSQWLUraPLTv7Gme32zoF9KSTfLO7v53vZ3d/M7/fIth+IO6INt2jjoA7bjHCJoAlzCRw59YwHYjBnfMPqAKWQYKjGkfCJqAF0xwZjipQtA3MxeSG87VhOOYegVrUCy7UZM9S6TLIdAamySTclZdYhFhRHloGYg7mgZv1Zzztvgud7V1tbQ2twYA34LJmF4p5dXF1KTufnE+SxeJtuCZNsLDCQU0+RyKTF27Unw101l8e6hns3u0PBalORVVVkcaEKBJDgV3+cGM4tKKmI+ohlIGnygKX00rSBfszz/n2uXv81wd6+rt1orsZCHRdr1Imk2F2Kob3hutSxW8thsd8AXNaln9D7CTfA6O+0UgkMuwVvEFFUbbAcrkcTA8+AtOk8E6KiQiDmMFSDqZItAzEVQviRkdDdaFgPp8HSZKAEAL5Qh7Sq2lIJBJwv2scUqkUnKoZgNhcDKhKg5aH+1IkcouCAdFGAQsuWZYhOjwFHQ96oagWgRoUov1T9kRBEODAwxM2QtEUl+Wp+Ln9VRo6BcMw4ErHRYjH4/B26AlQoQQTRdHWwcd9AH57+UAXddvDD37DmrBBV34WfqiXPl61g+vr6xA9zsGeM9gOdsNXkgpEtTwVvwOklXLKm6+/p5ezwk4B+j6droBs2CsGa/gNs6RIxazl4Tc25mpTgw/apPR1LYlNRFAzgsOxkyXYLIM1V8NMwyAkJSctD1eGVKiq5wWjSPdjmeTkiKvVW4f2YPHWl3GAVq6ymcyCTgovM3FzyRiDe2TaKcEKsLpJvNHjZgPNqEtyi6mZIm4SRFyLMUsONSSdkPeFtY1n0mczoY3BHTLhwPRy9/lzcziCw9ACI+yql0VLzcGAZbYSM5CCSZg1/9oc/nn7+i8N9p/8An4JMADxhH+xHfuiKwAAAABJRU5ErkJggg==)"
  545. },
  546. info: {
  547. "color": "#3A87AD",
  548. "background-color": "#D9EDF7",
  549. "border-color": "#BCE8F1",
  550. "background-image": "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QYFAhkSsdes/QAAA8dJREFUOMvVlGtMW2UYx//POaWHXg6lLaW0ypAtw1UCgbniNOLcVOLmAjHZolOYlxmTGXVZdAnRfXQm+7SoU4mXaOaiZsEpC9FkiQs6Z6bdCnNYruM6KNBw6YWewzl9z+sHImEWv+vz7XmT95f/+3/+7wP814v+efDOV3/SoX3lHAA+6ODeUFfMfjOWMADgdk+eEKz0pF7aQdMAcOKLLjrcVMVX3xdWN29/GhYP7SvnP0cWfS8caSkfHZsPE9Fgnt02JNutQ0QYHB2dDz9/pKX8QjjuO9xUxd/66HdxTeCHZ3rojQObGQBcuNjfplkD3b19Y/6MrimSaKgSMmpGU5WevmE/swa6Oy73tQHA0Rdr2Mmv/6A1n9w9suQ7097Z9lM4FlTgTDrzZTu4StXVfpiI48rVcUDM5cmEksrFnHxfpTtU/3BFQzCQF/2bYVoNbH7zmItbSoMj40JSzmMyX5qDvriA7QdrIIpA+3cdsMpu0nXI8cV0MtKXCPZev+gCEM1S2NHPvWfP/hL+7FSr3+0p5RBEyhEN5JCKYr8XnASMT0xBNyzQGQeI8fjsGD39RMPk7se2bd5ZtTyoFYXftF6y37gx7NeUtJJOTFlAHDZLDuILU3j3+H5oOrD3yWbIztugaAzgnBKJuBLpGfQrS8wO4FZgV+c1IxaLgWVU0tMLEETCos4xMzEIv9cJXQcyagIwigDGwJgOAtHAwAhisQUjy0ORGERiELgG4iakkzo4MYAxcM5hAMi1WWG1yYCJIcMUaBkVRLdGeSU2995TLWzcUAzONJ7J6FBVBYIggMzmFbvdBV44Corg8vjhzC+EJEl8U1kJtgYrhCzgc/vvTwXKSib1paRFVRVORDAJAsw5FuTaJEhWM2SHB3mOAlhkNxwuLzeJsGwqWzf5TFNdKgtY5qHp6ZFf67Y/sAVadCaVY5YACDDb3Oi4NIjLnWMw2QthCBIsVhsUTU9tvXsjeq9+X1d75/KEs4LNOfcdf/+HthMnvwxOD0wmHaXr7ZItn2wuH2SnBzbZAbPJwpPx+VQuzcm7dgRCB57a1uBzUDRL4bfnI0RE0eaXd9W89mpjqHZnUI5Hh2l2dkZZUhOqpi2qSmpOmZ64Tuu9qlz/SEXo6MEHa3wOip46F1n7633eekV8ds8Wxjn37Wl63VVa+ej5oeEZ/82ZBETJjpJ1Rbij2D3Z/1trXUvLsblCK0XfOx0SX2kMsn9dX+d+7Kf6h8o4AIykuffjT8L20LU+w4AZd5VvEPY+XpWqLV327HR7DzXuDnD8r+ovkBehJ8i+y8YAAAAASUVORK5CYII=)"
  551. },
  552. warn: {
  553. "color": "#C09853",
  554. "background-color": "#FCF8E3",
  555. "border-color": "#FBEED5",
  556. "background-image": "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABJlBMVEXr6eb/2oD/wi7/xjr/0mP/ykf/tQD/vBj/3o7/uQ//vyL/twebhgD/4pzX1K3z8e349vK6tHCilCWbiQymn0jGworr6dXQza3HxcKkn1vWvV/5uRfk4dXZ1bD18+/52YebiAmyr5S9mhCzrWq5t6ufjRH54aLs0oS+qD751XqPhAybhwXsujG3sm+Zk0PTwG6Shg+PhhObhwOPgQL4zV2nlyrf27uLfgCPhRHu7OmLgAafkyiWkD3l49ibiAfTs0C+lgCniwD4sgDJxqOilzDWowWFfAH08uebig6qpFHBvH/aw26FfQTQzsvy8OyEfz20r3jAvaKbhgG9q0nc2LbZxXanoUu/u5WSggCtp1anpJKdmFz/zlX/1nGJiYmuq5Dx7+sAAADoPUZSAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfdBgUBGhh4aah5AAAAlklEQVQY02NgoBIIE8EUcwn1FkIXM1Tj5dDUQhPU502Mi7XXQxGz5uVIjGOJUUUW81HnYEyMi2HVcUOICQZzMMYmxrEyMylJwgUt5BljWRLjmJm4pI1hYp5SQLGYxDgmLnZOVxuooClIDKgXKMbN5ggV1ACLJcaBxNgcoiGCBiZwdWxOETBDrTyEFey0jYJ4eHjMGWgEAIpRFRCUt08qAAAAAElFTkSuQmCC)"
  557. }
  558. }
  559. });