avvo-styleguide
Version:
Avvo styleguide
8 lines • 14 kB
JavaScript
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=34)}({0:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},1:function(t,e,n){!function(){function e(t,e){document.addEventListener?t.addEventListener("scroll",e,!1):t.attachEvent("scroll",e)}function n(t){this.a=document.createElement("div"),this.a.setAttribute("aria-hidden","true"),this.a.appendChild(document.createTextNode(t)),this.b=document.createElement("span"),this.c=document.createElement("span"),this.h=document.createElement("span"),this.f=document.createElement("span"),this.g=-1,this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.b.appendChild(this.h),this.c.appendChild(this.f),this.a.appendChild(this.b),this.a.appendChild(this.c)}function r(t,e){t.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+e+";"}function o(t){var e=t.a.offsetWidth,n=e+100;return t.f.style.width=n+"px",t.c.scrollLeft=n,t.b.scrollLeft=t.b.scrollWidth+100,t.g!==e&&(t.g=e,!0)}function i(t,n){function r(){var t=i;o(t)&&t.a.parentNode&&n(t.g)}var i=t;e(t.b,r),e(t.c,r),o(t)}function s(t,e){var n=e||{};this.family=t,this.style=n.style||"normal",this.weight=n.weight||"normal",this.stretch=n.stretch||"normal"}var a=null,c=null,u=null,l=null;function f(){return null===l&&(l=!!document.fonts),l}function h(){if(null===u){var t=document.createElement("div");try{t.style.font="condensed 100px sans-serif"}catch(t){}u=""!==t.style.font}return u}function d(t,e){return[t.style,t.weight,h()?t.stretch:"","100px",e].join(" ")}s.prototype.load=function(t,e){var o=this,s=t||"BESbswy",u=0,l=e||3e3,h=(new Date).getTime();return new Promise((function(t,e){if(f()&&!function(){if(null===c)if(f()&&/Apple/.test(window.navigator.vendor)){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);c=!!t&&603>parseInt(t[1],10)}else c=!1;return c}()){var p=new Promise((function(t,e){!function n(){(new Date).getTime()-h>=l?e(Error(l+"ms timeout exceeded")):document.fonts.load(d(o,'"'+o.family+'"'),s).then((function(e){1<=e.length?t():setTimeout(n,25)}),e)}()})),m=new Promise((function(t,e){u=setTimeout((function(){e(Error(l+"ms timeout exceeded"))}),l)}));Promise.race([m,p]).then((function(){clearTimeout(u),t(o)}),e)}else!function(t){document.body?t():document.addEventListener?document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e),t()})):document.attachEvent("onreadystatechange",(function e(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",e),t())}))}((function(){function c(){var e;(e=-1!=v&&-1!=y||-1!=v&&-1!=w||-1!=y&&-1!=w)&&((e=v!=y&&v!=w&&y!=w)||(null===a&&(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),a=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))),e=a&&(v==g&&y==g&&w==g||v==b&&y==b&&w==b||v==_&&y==_&&w==_)),e=!e),e&&(x.parentNode&&x.parentNode.removeChild(x),clearTimeout(u),t(o))}var f=new n(s),p=new n(s),m=new n(s),v=-1,y=-1,w=-1,g=-1,b=-1,_=-1,x=document.createElement("div");x.dir="ltr",r(f,d(o,"sans-serif")),r(p,d(o,"serif")),r(m,d(o,"monospace")),x.appendChild(f.a),x.appendChild(p.a),x.appendChild(m.a),document.body.appendChild(x),g=f.a.offsetWidth,b=p.a.offsetWidth,_=m.a.offsetWidth,function t(){if((new Date).getTime()-h>=l)x.parentNode&&x.parentNode.removeChild(x),e(Error(l+"ms timeout exceeded"));else{var n=document.hidden;!0!==n&&void 0!==n||(v=f.a.offsetWidth,y=p.a.offsetWidth,w=m.a.offsetWidth,c()),u=setTimeout(t,50)}}(),i(f,(function(t){v=t,c()})),r(f,d(o,'"'+o.family+'",sans-serif')),i(p,(function(t){y=t,c()})),r(p,d(o,'"'+o.family+'",serif')),i(m,(function(t){w=t,c()})),r(m,d(o,'"'+o.family+'",monospace'))}))}))},t.exports=s}()},17:function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var c,u=[],l=!1,f=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&d())}function d(){if(!l){var t=a(h);l=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},34:function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r),i=n(4);const s=document.documentElement;(()=>{sessionStorage.proximaLoaded&&sessionStorage.circularLoaded?s.className=s.className.replace(/(?:^|\s)(proxima|circular)-not-loaded(?!\S)/g,""):new o.a("Proxima Nova Subset",{weight:400}).load().then(()=>{s.className=s.className.replace("proxima-not-loaded","proxima-subset-loaded"),i.Promise.all([new o.a("Proxima Nova",{weight:400}).check(null,5e3),new o.a("Proxima Nova",{weight:700}).check(null,5e3)]).then(()=>{s.className=s.className.replace(/(?:^|\s)proxima-subset-loaded(?!\S)/,""),sessionStorage.proximaLoaded=!0})})})()},4:function(t,e,n){(function(e,n){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/var r;r=function(){"use strict";function t(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=0,i=void 0,s=void 0,a=function(t,e){p[o]=t,p[o+1]=e,2===(o+=2)&&(s?s(m):b())},c="undefined"!=typeof window?window:void 0,u=c||{},l=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(m,1)}}var p=new Array(1e3);function m(){for(var t=0;t<o;t+=2)(0,p[t])(p[t+1]),p[t]=void 0,p[t+1]=void 0;o=0}var v,y,w,g,b=void 0;function _(t,e){var n=this,r=new this.constructor(E);void 0===r[T]&&k(r);var o=n._state;if(o){var i=arguments[o-1];a((function(){return O(o,r,i,n._result)}))}else L(n,r,t,e);return r}function x(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(E);return S(e,t),e}f?b=function(){return e.nextTick(m)}:l?(y=0,w=new l(m),g=document.createTextNode(""),w.observe(g,{characterData:!0}),b=function(){g.data=y=++y%2}):h?((v=new MessageChannel).port1.onmessage=m,b=function(){return v.port2.postMessage(0)}):b=void 0===c?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(m)}:d()}catch(t){return d()}}():d();var T=Math.random().toString(36).substring(2);function E(){}function A(e,n,r){n.constructor===e.constructor&&r===_&&n.constructor.resolve===x?function(t,e){1===e._state?C(t,e._result):2===e._state?P(t,e._result):L(e,void 0,(function(e){return S(t,e)}),(function(e){return P(t,e)}))}(e,n):void 0===r?C(e,n):t(r)?function(t,e,n){a((function(t){var r=!1,o=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,(function(n){r||(r=!0,e!==n?S(t,n):C(t,n))}),(function(e){r||(r=!0,P(t,e))}),t._label);!r&&o&&(r=!0,P(t,o))}),t)}(e,n,r):C(e,n)}function S(t,e){if(t===e)P(t,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=e),null===r||"object"!==o&&"function"!==o)C(t,e);else{var n=void 0;try{n=e.then}catch(e){return void P(t,e)}A(t,e,n)}var r,o}function j(t){t._onerror&&t._onerror(t._result),N(t)}function C(t,e){void 0===t._state&&(t._result=e,t._state=1,0!==t._subscribers.length&&a(N,t))}function P(t,e){void 0===t._state&&(t._state=2,t._result=e,a(j,t))}function L(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+1]=n,o[i+2]=r,0===i&&t._state&&a(N,t)}function N(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?O(n,r,o,i):o(i);t._subscribers.length=0}}function O(e,n,r,o){var i=t(r),s=void 0,a=void 0,c=!0;if(i){try{s=r(o)}catch(t){c=!1,a=t}if(n===s)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else s=o;void 0!==n._state||(i&&c?S(n,s):!1===c?P(n,a):1===e?C(n,s):2===e&&P(n,s))}var M=0;function k(t){t[T]=M++,t._state=void 0,t._result=void 0,t._subscribers=[]}var W=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(E),this.promise[T]||k(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?C(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&C(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;void 0===this._state&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===x){var o=void 0,i=void 0,s=!1;try{o=t.then}catch(t){s=!0,i=t}if(o===_&&void 0!==t._state)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===D){var a=new n(E);s?P(a,i):A(a,t,o),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===t?P(r,n):this._result[e]=n),0===this._remaining&&C(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;L(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}(),D=function(){function e(t){this[T]=M++,this._result=this._state=void 0,this._subscribers=[],E!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){S(t,e)}),(function(e){P(t,e)}))}catch(e){P(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return t(e)?this.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):this.then(e,e)},e}();return D.prototype.then=_,D.all=function(t){return new W(this,t).promise},D.race=function(t){var e=this;return r(t)?new e((function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))},D.resolve=x,D.reject=function(t){var e=new this(E);return P(e,t),e},D._setScheduler=function(t){s=t},D._setAsap=function(t){a=t},D._asap=a,D.polyfill=function(){var t=void 0;if(void 0!==n)t=n;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=D},D.Promise=D,D},t.exports=r()}).call(this,n(17),n(0))}});